From d2bcf1340c3486b2dfcd831e2af345a099eaa65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 23 Aug 2010 18:05:19 +0000 Subject: [PATCH] Adding building 'binutils' before building the 'glibc' in stdenv-linux. This should allow keeping the i686-linux boostrap-tools. I updated some days ago the x86_64-linux bootstrap-tools, but that update is not needed anymore. We can revert that boostrap-tools update if anyone wants. Pro: - new gcc building gcc and glibc. Contra: - maybe some old systems (patched red had kernels come to mind) break with that update? svn path=/nixpkgs/branches/stdenv-updates/; revision=23370 --- pkgs/stdenv/linux/default.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 5654a8ccaf5..5cc6d4277f3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -160,10 +160,30 @@ rec { bootStdenv = stdenvLinuxBoot1; }; + # Create the first "real" standard environment. This one consists + # of bootstrap tools only, and a minimal Glibc to keep the GCC + # configure script happy. + stdenvLinuxBoot1half = stdenvBootFun { + gcc = wrapGCC { + libc = bootstrapGlibc; + binutils = stdenvLinuxBoot1Pkgs.binutils; + coreutils = bootstrapTools; + }; + inherit fetchurl; + }; + + + # 2) These are the packages that we can build with the first + # stdenv. We only need Glibc (in step 3). + stdenvLinuxBoot1halfPkgs = allPackages { + inherit system platform; + bootStdenv = stdenvLinuxBoot1half; + }; + # 3) Build Glibc with the bootstrap tools. The result is the full, # dynamically linked, final Glibc. - stdenvLinuxGlibc = stdenvLinuxBoot1Pkgs.glibc; + stdenvLinuxGlibc = stdenvLinuxBoot1halfPkgs.glibc; # 4) Construct a second stdenv identical to the first, except that @@ -177,7 +197,7 @@ rec { }; overrides = { glibc = stdenvLinuxGlibc; - inherit (stdenvLinuxBoot1Pkgs) perl; + inherit (stdenvLinuxBoot1halfPkgs) perl; }; inherit fetchurl; }) ["gcc" "binutils"]; @@ -215,7 +235,7 @@ rec { name = ""; }; overrides = { - inherit (stdenvLinuxBoot1Pkgs) perl; + inherit (stdenvLinuxBoot1halfPkgs) perl; }; inherit fetchurl; };