mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 14:41:27 +00:00
cc-wrapper: only set -march when platform.gcc.arch is specified
We want to make sure this value is explicitly set. Infering it for every arch leads to annoying failures like: https://hydra.nixos.org/build/92583832/ Perhaps we can enable it in the future with some smarter handling of cc-wrapper.sh.
This commit is contained in:
parent
d53042e83e
commit
23c520d95e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user