diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix index fb3796394e8..478040132b8 100644 --- a/pkgs/os-specific/gnu/default.nix +++ b/pkgs/os-specific/gnu/default.nix @@ -2,7 +2,7 @@ args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool , texinfo, glibcCross, hurdPartedCross, libuuid, samba -, gccCrossStageStatic, gccCrossStageFinal +, gccCrossStageStatic, gcc , forceSystem, newScope, platform, config , targetPlatform, buildPlatform , overrides ? {} @@ -28,7 +28,7 @@ let automake = automake111x; headersOnly = false; cross = assert targetPlatform != buildPlatform; targetPlatform; - gccCross = gccCrossStageFinal; + gccCross = gcc; }; hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd { diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index c83714d01f2..8197510eeec 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -35,7 +35,7 @@ in bootStages ++ [ targetPlatform = crossSystem; cc = if crossSystem.useiOSCross or false then buildPackages.darwin.ios-cross - else buildPackages.gccCrossStageFinal; + else buildPackages.gcc; }; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 73d65d4ad08..860567283b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5426,6 +5426,8 @@ with pkgs; cc = buildPackages.gccCrossStageStatic; }; + # The GCC used to build libc for the target platform. Normal gccs will be + # built with, and use, that cross-compiled libc. gccCrossStageStatic = assert targetPlatform != buildPlatform; let libcCross1 = if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers @@ -5456,12 +5458,6 @@ with pkgs; libc = windows.mingw_headers2; }; - gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCWith { - name = "gcc-cross-wrapper"; - cc = gcc.cc; - libc = libcCross; - }; - gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { inherit noSysDirs; texinfo = texinfo4; @@ -6226,6 +6222,7 @@ with pkgs; ccWrapperFun = callPackage ../build-support/cc-wrapper; wrapCC = cc: wrapCCWith { + name = lib.optionalString (targetPlatform != hostPlatform) "gcc-cross-wrapper"; inherit cc; libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; }; diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 94c1e6c7ad2..62f7134616b 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -19,7 +19,7 @@ let }; gnuCommon = lib.recursiveUpdate common { - buildPackages.gccCrossStageFinal = nativePlatforms; + buildPackages.gcc = nativePlatforms; coreutils = nativePlatforms; };