gcc48: Reduce diff to gcc49

This commit is contained in:
Tuomas Tynkkynen 2017-11-29 22:03:08 +02:00
parent 77b409b2cf
commit 825b953bf5
2 changed files with 14 additions and 14 deletions

View file

@ -115,7 +115,7 @@ let version = "4.8.5";
gccFpu = platform.gcc.fpu or null; gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null; gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null; gccMode = platform.gcc.mode or null;
in in
optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++ optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -186,7 +186,7 @@ let version = "4.8.5";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips; bootstrap = targetPlatform == hostPlatform;
in in
@ -343,14 +343,6 @@ stdenv.mkDerivation ({
}" }"
] ++ ] ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
(if enableMultilib (if enableMultilib
then ["--enable-multilib" "--disable-libquadmath"] then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"]) ++ else ["--disable-multilib"]) ++
@ -359,6 +351,14 @@ stdenv.mkDerivation ({
then ["--enable-plugin"] then ["--enable-plugin"]
else ["--disable-plugin"]) ++ else ["--disable-plugin"]) ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
# Java options # Java options
optionals langJava [ optionals langJava [
"--with-ecj-jar=${javaEcj}" "--with-ecj-jar=${javaEcj}"
@ -422,7 +422,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc"; CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm"; NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++"; CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null # If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true; dontStrip = true;
configureFlags = configureFlags =
@ -431,7 +431,7 @@ stdenv.mkDerivation ({
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
optional javaAwtGtk "--enable-java-awt=gtk" ++ optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++ optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++
[ [
"--with-gmp=${gmp.crossDrv}" "--with-gmp=${gmp.crossDrv}"
"--with-mpfr=${mpfr.crossDrv}" "--with-mpfr=${mpfr.crossDrv}"
@ -502,7 +502,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS = EXTRA_TARGET_CFLAGS =
if targetPlatform != hostPlatform && libcCross != null then [ if targetPlatform != hostPlatform && libcCross != null then [
"-idirafter ${libcCross.dev}/include" "-idirafter ${getDev libcCross}/include"
] ]
++ optionals (! crossStageStatic) [ ++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib" "-B${libcCross.out}/lib"

View file

@ -430,7 +430,7 @@ stdenv.mkDerivation ({
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
optional javaAwtGtk "--enable-java-awt=gtk" ++ optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++ optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++
[ [
"--with-gmp=${gmp.crossDrv}" "--with-gmp=${gmp.crossDrv}"
"--with-mpfr=${mpfr.crossDrv}" "--with-mpfr=${mpfr.crossDrv}"