anchor.diff:        ppl = pkgs.ppl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
       };
       extraAttrs = {
  -      glibc = stdenvLinuxGlibc;   # Required by gcc47 build
  -    };
  -    extraPath = [ stdenvLinuxBoot1Pkgs.paxctl ];
  -  };
  -
  -
  -  # 7) The packages that can be built using the third stdenv.
  -  stdenvLinuxBoot3Pkgs = allPackages {
  -    inherit system platform;
  -    bootStdenv = stdenvLinuxBoot3;
  -  };
  -
  -
  -  # 8) Construct a fourth stdenv identical to the second, except that
  -  #    this one uses the new GCC from step 7.  The other tools
  -  #    (e.g. coreutils) are still from the bootstrap tools.
  -  stdenvLinuxBoot4 = stdenvBootFun {
  -    gcc = wrapGCC rec {
  -      gcc = stdenvLinuxBoot3Pkgs.gcc.gcc;
  -      libc = stdenvLinuxGlibc;
  -      binutils = binutils1;
  +      glibc = stage2.pkgs.glibc;  # Required by gcc47 build
  +    };
  +    extraPath = [ stage1.pkgs.paxctl ];
  +  };
  +
  +
  +  # Construct a fourth stdenv that uses the new GCC.  But coreutils is
  +  # still from the bootstrap tools.
  +  stage4 = stageFun {
  +    gcc = wrapGCC {
  +      gcc = stage3.pkgs.gcc.gcc;
  +      libc = stage2.pkgs.glibc;
  +      binutils = stage1.pkgs.binutils;
         coreutils = bootstrapTools;
         name = "";
       };
  -    extraPath = [ stdenvLinuxBoot3Pkgs.xz ];
  -    overrides = pkgs: {
  -      inherit (stdenvLinuxBoot1Pkgs) perl;
  -      inherit (stdenvLinuxBoot3Pkgs) gettext gnum4 gmp;
  -    };
  -  };
  -
  -
  -  # 9) The packages that can be built using the fourth stdenv.
  -  stdenvLinuxBoot4Pkgs = allPackages {
  -    inherit system platform;
  -    bootStdenv = stdenvLinuxBoot4;
  -  };
  -
  -
  -  # 10) Construct the final stdenv.  It uses the Glibc and GCC, and
  -  #     adds in a new binutils that doesn't depend on bootstrap-tools,
  -  #     as well as dynamically linked versions of all other tools.
  +    extraPath = [ stage3.pkgs.xz ];
  +    overrides = pkgs: {
  +      inherit (stage1.pkgs) perl;
  +      inherit (stage3.pkgs) gettext gnum4 gmp glibc;
  +    };
  +  };
  +
  +
  +  # Construct the final stdenv.  It uses the Glibc and GCC, and adds
  +  # in a new binutils that doesn't depend on bootstrap-tools, as well
  +  # as dynamically linked versions of all other tools.
     #
  -  #     When updating stdenvLinux, make sure that the result has no
  -  #     dependency (`nix-store -qR') on bootstrapTools or the
  -  #     first binutils built.
  +  # When updating stdenvLinux, make sure that the result has no
  +  # dependency (`nix-store -qR') on bootstrapTools or the first
  +  # binutils built.
     stdenvLinux = import ../generic rec {
       inherit system config;
   
  
positive.code:       extraAttrs = extraAttrs // { inherit platform; };
        overrides = pkgs: (overrides pkgs) // { fetchurl = thisStdenv.fetchurlBoot; };
      };
      in thisStdenv;
  
    # Build a dummy stdenv with no GCC or working fetchurl.  This is
    # because we need a stdenv to build the GCC wrapper and fetchurl.
    stdenvLinuxBoot0 = stdenvBootFun {
      gcc = "/no-such-path";
    };
  
  
    # The Glibc include directory cannot have the same prefix as the GCC
    # include directory, since GCC gets confused otherwise (it will
    # search the Glibc headers before the GCC headers).  So create a
    # dummy Glibc.
    bootstrapGlibc = stdenvLinuxBoot0.mkDerivation {
      name = "bootstrap-glibc";
      buildCommand = ''
        mkdir -p $out
        ln -s ${bootstrapTools}/lib $out/lib
        ln -s ${bootstrapTools}/include-glibc $out/include
      '';
    };
  
  
  
negative.code:   # The bootstrap process proceeds in several steps.
  
  
    # Create a standard environment by downloading pre-built binaries of
    # coreutils, GCC, etc.
  
  
    # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
  