mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 15:43:00 +00:00
Revert "gcc: fix clang build"
This fixes the gcc build but results in a gcc that doesn't generate
valid binaries.
gcc -o hello hello.c
./hello
Killed: 9
This reverts commit 2adf36ab8c
.
This commit is contained in:
parent
6225f1bf66
commit
d93c636737
@ -325,13 +325,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||||
|
|
||||||
preConfigure =
|
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||||
# 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 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 LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
|
||||||
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
|
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
|
||||||
|
Loading…
Reference in New Issue
Block a user