gcc-*: homogenize and cleanup expressions without a rebuild
Looks scary but it is a noop.
This commit is contained in:
@@ -52,12 +52,9 @@ with builtins;
|
||||
|
||||
let version = "4.8.5";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
patches = [ ]
|
||||
++ optional enableParallelBuilding ../parallel-bconfig.patch
|
||||
patches = [ ../parallel-bconfig.patch ]
|
||||
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
@@ -175,14 +172,14 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit patches;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
outputs = [ "out" "lib" "man" "info" ];
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
libc_dev = stdenv.cc.libc_dev;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
postPatch =
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
@@ -209,8 +206,9 @@ stdenv.mkDerivation ({
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
|
||||
buildInputs = [ gmp mpfr libmpc libelf ]
|
||||
++ (optional (cloog != null) cloog)
|
||||
buildInputs = [
|
||||
gmp mpfr libmpc libelf
|
||||
] ++ (optional (cloog != null) cloog)
|
||||
++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
@@ -222,7 +220,6 @@ 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"
|
||||
@@ -354,13 +351,13 @@ stdenv.mkDerivation ({
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ])
|
||||
);
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
));
|
||||
|
||||
EXTRA_TARGET_FLAGS = optionals
|
||||
(targetPlatform != hostPlatform && libcCross != null)
|
||||
([
|
||||
"-idirafter ${libcCross.dev}/include"
|
||||
"-idirafter ${getDev libcCross}/include"
|
||||
] ++ optionals (! crossStageStatic) [
|
||||
"-B${libcCross.out}/lib"
|
||||
]);
|
||||
@@ -382,7 +379,8 @@ stdenv.mkDerivation ({
|
||||
hardeningUnsupportedFlags = [ "stackprotector" ];
|
||||
};
|
||||
|
||||
inherit enableParallelBuilding enableMultilib;
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user