gcc5: set --build and --host in the case where those differ and make sure to have a build cc-wrapper around as well

This commit is contained in:
Ross MacLeod 2017-06-05 04:37:47 +00:00 committed by John Ericson
parent 7c754b1e3b
commit 198dceccbe

View File

@ -35,6 +35,7 @@
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
assert langJava -> zip != null && unzip != null
@ -312,6 +313,7 @@ stdenv.mkDerivation ({
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [binutils])
++ (optionals (buildPlatform != hostPlatform) [buildPackages.stdenv.cc])
++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat])
@ -449,6 +451,8 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
--build=${buildPlatform.config}
--host=${hostPlatform.config}
--target=${targetPlatform.config}
${xwithArch}
${xwithCpu}