LLVM-3.9: Fix RPATH in cross compile builds

This error was cause by multiple-outputs.sh not setting
NIX_CROSS_LDFLAGS
This commit is contained in:
Joe Hermaszewski 2017-04-25 22:23:58 +00:00
parent 12bbc63024
commit fea424fea3

View File

@ -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; [