diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2021-01-22 14:07:06 -0800 |
---|---|---|
committer | Jonathan Ringer <jonringer117@gmail.com> | 2021-01-22 14:07:06 -0800 |
commit | 0bc275e63423456d6deb650e146120c39c1e0723 (patch) | |
tree | 1d33aa707b24fa58952162457e243c731836f99b /pkgs/build-support/cc-wrapper | |
parent | 2e5475381b65290e08d357fa1434bd28d0c21cfa (diff) | |
download | nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar.gz nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar.bz2 nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar.lz nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar.xz nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.tar.zst nixpkgs-0bc275e63423456d6deb650e146120c39c1e0723.zip |
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged into master This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index faa62cb5b12..d1d5f8e6c86 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -403,31 +403,31 @@ stdenv.mkDerivation { # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in # that case. + optionalString ((targetPlatform ? platform.gcc.arch) && - isGccArchSupported targetPlatform.gcc.arch) '' - echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.platform.gcc.arch) '' + echo "-march=${targetPlatform.platform.gcc.arch}" >> $out/nix-support/cc-cflags-before '' # -mcpu is not very useful. You should use mtune and march # instead. It’s provided here for backwards compatibility. + optionalString (targetPlatform ? platform.gcc.cpu) '' - echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before + echo "-mcpu=${targetPlatform.platform.gcc.cpu}" >> $out/nix-support/cc-cflags-before '' # -mfloat-abi only matters on arm32 but we set it here # unconditionally just in case. If the abi specifically sets hard # vs. soft floats we use it here. + optionalString (targetPlatform ? platform.gcc.float-abi) '' - echo "-mfloat-abi=${targetPlatform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before + echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.fpu) '' - echo "-mfpu=${targetPlatform.gcc.fpu}" >> $out/nix-support/cc-cflags-before + echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.mode) '' - echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before + echo "-mmode=${targetPlatform.platform.gcc.mode}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.tune && - isGccArchSupported targetPlatform.gcc.tune) '' - echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.platform.gcc.tune) '' + echo "-mtune=${targetPlatform.platform.gcc.tune}" >> $out/nix-support/cc-cflags-before '' # TODO: categorize these and figure out a better place for them |