@@ -115,7 +115,7 @@ let version = "4.8.5";
115115 gccFpu = platform.gcc.fpu or null;
116116 gccFloat = platform.gcc.float or null;
117117 gccMode = platform.gcc.mode or null;
118− in
118+ in
119119 optional (gccArch != null) "--with-arch=${gccArch}" ++
120120 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
121121 optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@@ -186,7 +186,7 @@ let version = "4.8.5";
186186 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
187187 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
188188
189− bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips;
189+ bootstrap = targetPlatform == hostPlatform;
190190
191191in
192192
@@ -343,14 +343,6 @@ stdenv.mkDerivation ({
343343 }"
344344 ] ++
345345
346− # Optional features
347− optional (isl != null) "--with-isl=${isl}" ++
348− optionals (cloog != null) [
349− "--with-cloog=${cloog}"
350− "--disable-cloog-version-check"
351− "--enable-cloog-backend=isl"
352− ] ++
353−
354346 (if enableMultilib
355347 then ["--enable-multilib" "--disable-libquadmath"]
356348 else ["--disable-multilib"]) ++
@@ -359,6 +351,14 @@ stdenv.mkDerivation ({
359351 then ["--enable-plugin"]
360352 else ["--disable-plugin"]) ++
361353
354+ # Optional features
355+ optional (isl != null) "--with-isl=${isl}" ++
356+ optionals (cloog != null) [
357+ "--with-cloog=${cloog}"
358+ "--disable-cloog-version-check"
359+ "--enable-cloog-backend=isl"
360+ ] ++
361+
362362 # Java options
363363 optionals langJava [
364364 "--with-ecj-jar=${javaEcj}"
@@ -422,7 +422,7 @@ stdenv.mkDerivation ({
422422 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
423423 NM_FOR_TARGET = "${targetPlatform.config}-nm";
424424 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
425− # If we are making a cross compiler, cross != null
425+ # If we are making a cross compiler, targetPlatform != hostPlatform
426426 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
427427 dontStrip = true;
428428 configureFlags =
@@ -431,7 +431,7 @@ stdenv.mkDerivation ({
431431 optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
432432 optional javaAwtGtk "--enable-java-awt=gtk" ++
433433 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
434− optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++
434+ optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++
435435 [
436436 "--with-gmp=${gmp.crossDrv}"
437437 "--with-mpfr=${mpfr.crossDrv}"
@@ -502,7 +502,7 @@ stdenv.mkDerivation ({
502502
503503 EXTRA_TARGET_CFLAGS =
504504 if targetPlatform != hostPlatform && libcCross != null then [
505− "-idirafter ${libcCross.dev}/include"
505+ "-idirafter ${getDev libcCross}/include"
506506 ]
507507 ++ optionals (! crossStageStatic) [
508508 "-B${libcCross.out}/lib"