gcc-7: sync some parts of expression from gcc-6

They are likely unintentional differences; see
https://github.com/NixOS/nixpkgs/commit/0dc547373#commitcomment-25554824
$SOURCE_DATE_EPOCH should work for gcc-7 without patching.
This commit is contained in:
Vladimír Čunát 2017-11-11 21:10:57 +01:00
parent 1862b77b5d
commit 3610d63d72
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -33,7 +33,6 @@
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
, flex ? null
, buildPlatform, hostPlatform, targetPlatform
}:
@ -169,7 +168,6 @@ let version = "7.2.0";
else
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
else " --with-headers=${getDev libcCross}/include") +
# Ensure that -print-prog-name is able to find the correct programs.
" --enable-__cxa_atexit" +
" --enable-long-long" +
(if crossMingw then
@ -302,7 +300,7 @@ stdenv.mkDerivation ({
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
buildInputs = [ gmp mpfr libmpc libelf flex ]
buildInputs = [ gmp mpfr libmpc libelf ]
++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
@ -424,8 +422,8 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
@ -563,7 +561,7 @@ stdenv.mkDerivation ({
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)