gcc-*: homogenize and cleanup expressions with a mass rebuild

This commit is contained in:
Jan Malakhovski 2018-09-04 20:12:18 +00:00
parent e0b5919197
commit eae890db12
7 changed files with 11 additions and 19 deletions

@ -206,15 +206,22 @@ stdenv.mkDerivation ({
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
# For building runtime libs
depsBuildTarget =
if hostPlatform == buildPlatform then [
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
] else assert targetPlatform == hostPlatform; [ # build != host == target
stdenv.cc
];
buildInputs = [
gmp mpfr libmpc libelf
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (cloog != null) cloog)
++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)

@ -231,8 +231,6 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
@ -259,7 +257,8 @@ stdenv.mkDerivation ({
[
"--with-gmp-include=${gmp.dev}/include"
"--with-gmp-lib=${gmp.out}/lib"
"--with-mpfr=${mpfr.dev}"
"--with-mpfr-include=${mpfr.dev}/include"
"--with-mpfr-lib=${mpfr.out}/lib"
"--with-mpc=${libmpc}"
] ++
optional (libelf != null) "--with-libelf=${libelf}" ++

@ -235,12 +235,10 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";

@ -237,12 +237,9 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";

@ -207,12 +207,9 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";

@ -202,12 +202,9 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";

@ -172,12 +172,9 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";