diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-11 03:51:33 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-11 03:51:33 +0100 |
commit | c1e6c6af692c2cf07b4982c0f573acc9f16b78fc (patch) | |
tree | c436a224f5f71c2a2d91926240b76ceab78d77b9 /pkgs/build-support/cc-wrapper | |
parent | 33aa224777a5077ff1dfa4c8f4653d8aab268d76 (diff) | |
parent | b0644b461f97d4f7240b089074084c18f521f497 (diff) |
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index abc88910c36d2..33455efd5258b 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -73,6 +73,7 @@ let # older compilers (for example bootstrap's GCC 5) fail with -march=too-modern-cpu isGccArchSupported = arch: + if targetPlatform.isPower then false else # powerpc does not allow -march= if isGNU then { # Intel skylake = versionAtLeast ccVersion "6.0"; @@ -433,8 +434,9 @@ stdenv.mkDerivation { echo "-march=${targetPlatform.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. + # -mcpu is not very useful, except on PowerPC where it is used + # instead of march. On all other platforms you should use mtune + # and march instead. # TODO: aarch64-darwin has mcpu incompatible with gcc + optionalString ((targetPlatform ? gcc.cpu) && (isClang || !(stdenv.isDarwin && stdenv.isAarch64))) '' echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before |