cc-wrapper: use legacy -mmacosx-version-min for gcc
See https://github.com/NixOS/nixpkgs/pull/105026#discussion_r587169144
This commit is contained in:
parent
362cb82b75
commit
8b59d52ca3
|
@ -485,10 +485,15 @@ stdenv.mkDerivation {
|
|||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
''
|
||||
|
||||
+ optionalString stdenv.targetPlatform.isDarwin ''
|
||||
+ optionalString stdenv.targetPlatform.isDarwin (
|
||||
let darwinPlatformForCC =
|
||||
if (targetPlatform.darwinPlatform == "macos" && isGNU) then "macosx"
|
||||
else targetPlatform.darwinPlatform;
|
||||
in ''
|
||||
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags
|
||||
echo "-m${targetPlatform.darwinPlatform}-version-min=${targetPlatform.darwinMinVersion}" >> $out/nix-support/cc-cflags-before
|
||||
echo "-m${darwinPlatformForCC}-version-min=${targetPlatform.darwinMinVersion}" >> $out/nix-support/cc-cflags-before
|
||||
''
|
||||
)
|
||||
|
||||
##
|
||||
## Extra custom steps
|
||||
|
|
Loading…
Reference in a new issue