diff options
author | Dan Peebles <pumpkin@me.com> | 2017-10-06 01:26:19 -0400 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-10-08 16:13:46 -0400 |
commit | b426c85ce2f12b81b923bf8d0539d15a41b3a341 (patch) | |
tree | f5e463c3cdc9e94fb2484a604594a66c93aec39e /pkgs/build-support/cc-wrapper | |
parent | 0be2928ac9f8fa7ad2245785e586381ba8002585 (diff) | |
download | nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar.gz nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar.bz2 nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar.lz nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar.xz nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.tar.zst nixpkgs-b426c85ce2f12b81b923bf8d0539d15a41b3a341.zip |
Get rid of most @rpath nonsense on Darwin
This requires some small changes in the stdenv, then working around the weird choice LLVM made to hardcode @rpath in its install name, and then lets us remove a ton of annoying workaround hacks in many of our Go packages. With any luck this will mean less hackery going forward.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/ld-wrapper.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/cc-wrapper/ld-wrapper.sh b/pkgs/build-support/cc-wrapper/ld-wrapper.sh index bbab3c43d6f..232e1245af0 100644 --- a/pkgs/build-support/cc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/ld-wrapper.sh @@ -171,11 +171,13 @@ if [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ]; then done done - if [ -n "${NIX_COREFOUNDATION_RPATH:-}" ]; then - extraAfter+=(-rpath $NIX_COREFOUNDATION_RPATH) - fi fi +# This is outside the DONT_SET_RPATH branch because it's more targeted and we +# usually want it (on Darwin) even if DONT_SET_RPATH is set. +if [ -n "${NIX_COREFOUNDATION_RPATH:-}" ]; then + extraAfter+=(-rpath $NIX_COREFOUNDATION_RPATH) +fi # Only add --build-id if this is a final link. FIXME: should build gcc # with --enable-linker-build-id instead? |