summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorJoe Hermaszewski <git@monoid.al>2017-04-25 22:23:58 +0000
committerJoe Hermaszewski <git@monoid.al>2017-04-25 22:25:17 +0000
commitfea424fea33b7b71dfc43b3297ad2d1d2da36f5a (patch)
treee70480774bbec0454cb6e6fe9112e7b7a4296e60 /pkgs/development/compilers
parent12bbc630247f85f4fa84c100d856a712b6d7cf4d (diff)
downloadnixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar.gz
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar.bz2
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar.lz
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar.xz
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.tar.zst
nixlib-fea424fea33b7b71dfc43b3297ad2d1d2da36f5a.zip
LLVM-3.9: Fix RPATH in cross compile builds
This error was cause by multiple-outputs.sh not setting
NIX_CROSS_LDFLAGS
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix
index 0408b9413c8a..6c86ac0c2942 100644
--- a/pkgs/development/compilers/llvm/3.9/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.9/llvm.nix
@@ -81,6 +81,12 @@ in stdenv.mkDerivation rec {
   preBuild = ''
     mkdir -p $out/
     ln -sv $PWD/lib $out
+  ''
+  + # This is a good candidate for using the `placeholder` primitive when it's released
+    # This should hopefully be unnecessary once
+    # https://github.com/NixOS/nixpkgs/pull/25047 is merged
+    stdenv.lib.optionalString (buildPlatform != hostPlatform && enableSharedLibraries) ''
+    export NIX_CROSS_LDFLAGS="-rpath $lib/lib -rpath $lib/lib64 $NIX_CROSS_LDFLAGS"
   '';
 
   cmakeFlags = with stdenv; [