From 49e5837780b9811f5cb9f36979a3a3b737b2d94f Mon Sep 17 00:00:00 2001 From: Gergely Risko Date: Sun, 24 Aug 2014 15:47:10 +0200 Subject: [PATCH] Move wrapGCC helper up This commit doesn't change the outhash (or drvhash) of the stdenv. --- pkgs/stdenv/linux/default.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) 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.