Skip to content

Commit

Permalink
cc-wrapper: fix LD_DYLD_PATH on darwin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LnL7 committed Aug 9, 2017
1 parent d119385 commit bf8c125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/cc-wrapper/default.nix
Expand Up @@ -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
Expand Down

0 comments on commit bf8c125

Please sign in to comment.