gcc: fix clang build

Fixes #27889

This works properly now that LD_DYLD_PATH is fixed

+7 -1
+7 -1
pkgs/development/compilers/gcc/5/default.nix
··· 325 325 326 326 NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; 327 327 328 - preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' 328 + preConfigure = 329 + # Not sure why this is causing problems, now that the stdenv 330 + # exports CPP=cpp the build fails with strange errors on darwin. 331 + # https://github.com/NixOS/nixpkgs/issues/27889 332 + stdenv.lib.optionalString stdenv.cc.isClang '' 333 + unset CPP 334 + '' + stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' 329 335 export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` 330 336 export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" 331 337 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"