Fix compilation of GCC 4.9 on SmartOS.

Fix ld-solaris-wrapper never calling ld (since gcc->cc-wrapper refactor).
This commit is contained in:
Danny Wilson 2015-11-08 02:44:38 +01:00
parent bab0a82983
commit f17dea3b3d
3 changed files with 4 additions and 4 deletions

View file

@ -145,7 +145,7 @@ stdenv.mkDerivation {
+ optionalString (stdenv.isSunOS && nativePrefix != "") ''
# Solaris needs an additional ld wrapper.
ldPath="${nativePrefix}/bin"
ld="$out/bin/ld-solaris"
exec="$ldPath/ld"
wrap ld-solaris ${./ld-solaris-wrapper.sh}
'')

View file

@ -6,7 +6,7 @@ set -u
# I've also tried adding -z direct and -z lazyload, but it gave too many problems with C++ exceptions :'(
# Also made sure libgcc would not be lazy-loaded, as suggested here: https://www.illumos.org/issues/2534#note-3
# but still no success.
cmd="@prog@ -z ignore"
cmd="@ld@ -z ignore"
args=("$@");

View file

@ -293,9 +293,8 @@ stdenv.mkDerivation ({
++ (optional stdenv.isDarwin gnused)
;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
sed -i -e "s/-lrt//g" libstdc++-v3/configure
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"
@ -518,6 +517,7 @@ stdenv.mkDerivation ({
platforms =
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
optionals (langAda == false) stdenv.lib.platforms.darwin;
};
}