@@ -35,6 +35,7 @@
3535, cloog # unused; just for compat with gcc4, as we override the parameter on some places
3636, darwin ? null
3737, buildPlatform, hostPlatform, targetPlatform
38+, buildPackages
3839}:
3940
4041assert langJava -> zip != null && unzip != null
@@ -312,6 +313,7 @@ stdenv.mkDerivation ({
312313 ++ (optionals langJava [ boehmgc zip unzip ])
313314 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
314315 ++ (optionals (targetPlatform != hostPlatform) [binutils])
316+ ++ (optionals (buildPlatform != hostPlatform) [buildPackages.stdenv.cc])
315317 ++ (optionals langAda [gnatboot])
316318 ++ (optionals langVhdl [gnat])
317319
@@ -449,6 +451,8 @@ stdenv.mkDerivation ({
449451 )
450452 }
451453 ${if langAda then " --enable-libada" else ""}
454+ --build=${buildPlatform.config}
455+ --host=${hostPlatform.config}
452456 --target=${targetPlatform.config}
453457 ${xwithArch}
454458 ${xwithCpu}