diff options
author | Andrew Childs <lorne@cons.org.nz> | 2021-04-11 10:27:16 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2021-04-11 10:27:16 +0900 |
commit | 6ee72dd5abf4eab49d6827ad19889c981c9a9eb0 (patch) | |
tree | 91de7dc2337628ed20b7f1d4c04233a14d399094 /pkgs/build-support/bintools-wrapper | |
parent | 33265e0dd9c485197e440192bef3f15e4f366af9 (diff) | |
download | nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar.gz nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar.bz2 nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar.lz nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar.xz nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.tar.zst nixpkgs-6ee72dd5abf4eab49d6827ad19889c981c9a9eb0.zip |
bintools-wrapper: ensure roles are set before mangling variables
Diffstat (limited to 'pkgs/build-support/bintools-wrapper')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh index bd3edda3f2e..75d9484846a 100644 --- a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh +++ b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh @@ -21,6 +21,15 @@ havePlatformVersionFlag= haveDarwinSDKVersion= haveDarwinPlatformVersion= +# Roles will set by add-flags.sh, but add-flags.sh can be skipped when the +# cc-wrapper has added the linker flags. Both the cc-wrapper and the binutils +# wrapper mangle the same variable (MACOSX_DEPLOYMENT_TARGET), so if roles are +# empty due to being run through the cc-wrapper then the mangle here is a no-op +# and we still do the right thing. +# +# To be robust, make sure we always have the correct set of roles. +accumulateRoles + mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"} n=0 |