diff options
Diffstat (limited to 'pkgs/build-support/cc-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 84548a6b1dfb..cf2d38cd9978 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -306,9 +306,9 @@ stdenv.mkDerivation { # Always add -march based on cpu in triple. Sometimes there is a # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in # that case. - + optionalString ((targetPlatform ? platform.gcc.arch || targetPlatform.parsed.cpu ? arch) && - isGccArchSupported targetPlatform.platform.gcc.arch or targetPlatform.parsed.cpu.arch) '' - echo "-march=${targetPlatform.platform.gcc.arch or targetPlatform.parsed.cpu.arch}" >> $out/nix-support/cc-cflags-before + + optionalString ((targetPlatform ? platform.gcc.arch) && + 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 @@ -320,8 +320,8 @@ stdenv.mkDerivation { # -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 || targetPlatform.parsed.abi ? float) '' - echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi or targetPlatform.parsed.abi.float}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? platform.gcc.float-abi) '' + echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.fpu) '' echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before |