diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 911279a90b8..802904b1903 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1922,9 +1922,6 @@ let gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.6 { inherit noSysDirs; - cross = null; - libcCross = null; - binutilsCross = null; ppl = ppl0_11; cloogppl = null; @@ -1932,6 +1929,16 @@ let # bootstrapping a profiled compiler does not work in the sheevaplug: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true; + + # When building `gcc.hostDrv' (a "Canadian cross", with host == target + # and host != build), `cross' must be null but the cross-libc must still + # be passed. + cross = null; + libcCross = if crossSystem != null then libcCross else null; + libpthreadCross = + if crossSystem != null && crossSystem.config == "i586-pc-gnu" + then gnu.libpthreadCross + else null; })); # A non-stripped version of GCC.