git.iko.soy/typeable/nixpkgs
on master help sign in
gcc5: set --build and --host in the case where those differ and make sure to have a build cc-wrapper around as well
commit198dceccbe5414a5fd72ca83624c0cc715db1aad authorRoss MacLeod <rmm-github@z.odi.ac> dateMon 5 Jun 2017, 04:37 (9 years ago) parent7c754b1
1 file changed+4
pkgs/development/compilers/gcc/5/default.nix+4
pkgs/development/compilers/gcc/5/default.nix+4
@@ -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}