From 27916e6f083e67e4d43986584f5ed41a7d16b54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 27 Feb 2012 17:22:30 +0000 Subject: [PATCH] GCC 4.6: Fix the Canadian cross. svn path=/nixpkgs/trunk/; revision=32621 --- pkgs/top-level/all-packages.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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.