gcc: Deduplicate preConfigure

This commit is contained in:
John Ericson
2019-11-10 15:15:04 -05:00
parent ca341c2d5b
commit f666c61d20
9 changed files with 44 additions and 55 deletions
@@ -228,12 +228,10 @@ stdenv.mkDerivation ({
++ (optional hostPlatform.isDarwin gnused)
;
preConfigure = 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"
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
'';
preConfigure = import ../common/pre-configure.nix {
inherit (stdenv) lib;
inherit version hostPlatform langJava langGo;
};
dontDisableStatic = true;