summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorDaniel Peebles <copumpkin@users.noreply.github.com>2017-10-08 16:21:27 -0400
committerGitHub <noreply@github.com>2017-10-08 16:21:27 -0400
commit416979f3f77a855b4460fa15cab52445378f660e (patch)
tree835594ae16861a2c5769bcbc747c22271f690709 /pkgs/build-support
parentd32f7f4bb3b6a80fa79f097881b92bcebf702478 (diff)
parentb426c85ce2f12b81b923bf8d0539d15a41b3a341 (diff)
downloadnixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar.gz
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar.bz2
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar.lz
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar.xz
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.tar.zst
nixpkgs-416979f3f77a855b4460fa15cab52445378f660e.zip
Merge pull request #30150 from copumpkin/no-rpath-nonsense
Get rid of most @rpath nonsense on Darwin
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/ld-wrapper.sh8
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?