mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
Merge pull request #28050 from LnL7/darwin-gcc
gcc and gdb: fix clang build
This commit is contained in:
commit
c839b6ce0a
@ -325,7 +325,13 @@ stdenv.mkDerivation ({
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||
preConfigure =
|
||||
# Not sure why this is causing problems, now that the stdenv
|
||||
# exports CPP=cpp the build fails with strange errors on darwin.
|
||||
# https://github.com/NixOS/nixpkgs/issues/27889
|
||||
stdenv.lib.optionalString stdenv.cc.isClang ''
|
||||
unset CPP
|
||||
'' + stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
|
||||
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
|
||||
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
|
||||
|
@ -66,6 +66,13 @@ stdenv.mkDerivation rec {
|
||||
++ stdenv.lib.optional (!pythonSupport) "--without-python"
|
||||
++ stdenv.lib.optional multitarget "--enable-targets=all";
|
||||
|
||||
preConfigure =
|
||||
# Not sure why this is causing problems, now that the stdenv
|
||||
# exports CPP=cpp the build fails with strange errors on darwin.
|
||||
stdenv.lib.optionalString stdenv.cc.isClang ''
|
||||
unset CPP
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
'' # Remove Info files already provided by Binutils and other packages.
|
||||
rm -v $out/share/info/bfd.info
|
||||
|
Loading…
Reference in New Issue
Block a user