diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 6c910c284a5c..2d96869f23e2 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -66,6 +66,18 @@ rec { }; + # A helper function to call gcc-wrapper. + wrapGCC = + { gcc, libc, binutils, coreutils, name }: + + lib.makeOverridable (import ../../build-support/gcc-wrapper) { + nativeTools = false; + nativeLibc = false; + inherit gcc binutils coreutils libc name; + stdenv = stage0.stdenv; + }; + + # This function builds the various standard environments used during # the bootstrap. In all stages, we build an stdenv and the package # set that can be built with that stdenv. @@ -101,6 +113,7 @@ rec { }; in { stdenv = thisStdenv; pkgs = thisPkgs; }; + # Build a dummy stdenv with no GCC or working fetchurl. This is # because we need a stdenv to build the GCC wrapper and fetchurl. stage0 = stageFun { @@ -124,18 +137,6 @@ rec { }; - # A helper function to call gcc-wrapper. - wrapGCC = - { gcc, libc, binutils, coreutils, name }: - - lib.makeOverridable (import ../../build-support/gcc-wrapper) { - nativeTools = false; - nativeLibc = false; - inherit gcc binutils coreutils libc name; - stdenv = stage0.stdenv; - }; - - # Create the first "real" standard environment. This one consists # of bootstrap tools only, and a minimal Glibc to keep the GCC # configure script happy.