cc-wrapper: fix LD_DYLD_PATH on darwin

Having multiple compilers in the build environment would result in an
invalid LD_DYLD_PATH like /usr/lib/dyld/usr/lib/dyld.
Since the path is hardcoded in XNU it can't be anything but
/usr/lib/dyld anyway.
This commit is contained in:
Daiderd Jordan 2017-08-09 23:00:56 +02:00
parent d119385b2e
commit bf8c125170
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -150,7 +150,7 @@ stdenv.mkDerivation {
echo $dynamicLinker > $out/nix-support/dynamic-linker
'' + (if targetPlatform.isDarwin then ''
printf "export LD_DYLD_PATH+=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook
printf "export LD_DYLD_PATH=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook
'' else ''
if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then
echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32