diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-23 00:25:34 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-23 00:32:45 -0400 |
commit | b0b0a06788d5a7b3a3b35063b058f1326f10e983 (patch) | |
tree | d1e760276967c85649a46edadfe97c9b0efd0b14 /pkgs/build-support/bintools-wrapper | |
parent | b0c75e811a6ad20f2f23f6392eae06a4d854c4dd (diff) |
bintools: only add macos flags when targeting macOS
We can’t set this for cross-compiling since we use the GNU linker.
Instead, set these flags only when targetPlatform is macOS.
Fixes #80754
Fixes #83141
Diffstat (limited to 'pkgs/build-support/bintools-wrapper')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 84020505a635..74feeece230f 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -248,6 +248,11 @@ stdenv.mkDerivation { printWords "''${ldflagsBefore[@]}" > $out/nix-support/libc-ldflags-before '') + + optionalString stdenv.targetPlatform.isMacOS '' + # Ensure consistent LC_VERSION_MIN_MACOSX and remove LC_UUID. + echo "-macosx_version_min 10.12 -sdk_version 10.12 -no_uuid" >> $out/nix-support/libc-ldflags-before + '' + + optionalString (!nativeTools) '' ## ## User env support |