diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-07 17:46:47 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-07 17:50:12 +0100 |
commit | 860c681fb3e97030f43659897552b133943a636a (patch) | |
tree | fd0dba22db6ae6cc65f05ce51b30ea0c49394493 /pkgs/stdenv/linux | |
parent | 10ab227126bfab4ad1675b6b95f8c1e7e6370b2d (diff) | |
download | nixlib-860c681fb3e97030f43659897552b133943a636a.tar nixlib-860c681fb3e97030f43659897552b133943a636a.tar.gz nixlib-860c681fb3e97030f43659897552b133943a636a.tar.bz2 nixlib-860c681fb3e97030f43659897552b133943a636a.tar.lz nixlib-860c681fb3e97030f43659897552b133943a636a.tar.xz nixlib-860c681fb3e97030f43659897552b133943a636a.tar.zst nixlib-860c681fb3e97030f43659897552b133943a636a.zip |
stdenv-linux: Prevent dependency on bootstrap-tools in the final binutils
Binutils nowadays contains ld.gold, which depends on libstdc++. So it needs to be built with the new GCC rather than the one from bootstrap-tools. Issue #1469.
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index b1e903ac610a..bedeea0915d3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -7,7 +7,7 @@ # The function defaults are for easy testing. { system ? builtins.currentSystem , allPackages ? import ../../top-level/all-packages.nix -, platform ? null, config }: +, platform ? null, config ? {} }: rec { @@ -166,12 +166,14 @@ rec { bootStdenv = stdenvLinuxBoot1; }; + binutils1 = stdenvLinuxBoot1Pkgs.binutils.override { gold = false; }; - # 3) 2nd stdenv that we will use to build only the glibc. + + # 3) 2nd stdenv that we will use to build only Glibc. stdenvLinuxBoot2 = stdenvBootFun { gcc = wrapGCC { libc = bootstrapGlibc; - binutils = stdenvLinuxBoot1Pkgs.binutils; + binutils = binutils1; coreutils = bootstrapTools; }; overrides = pkgs: { @@ -182,7 +184,7 @@ rec { # 4) These are the packages that we can build with the 2nd - # stdenv. We only need Glibc (in step 5). + # stdenv. stdenvLinuxBoot2Pkgs = allPackages { inherit system platform; bootStdenv = stdenvLinuxBoot2; @@ -194,12 +196,12 @@ rec { stdenvLinuxGlibc = stdenvLinuxBoot2Pkgs.glibc; - # 6) Construct a third stdenv identical to the 2nd, except that - # this one uses the Glibc built in step 3. It still uses - # the recent binutils and rest of the bootstrap tools, including GCC. + # 6) Construct a third stdenv identical to the 2nd, except that this + # one uses the Glibc built in step 5. It still uses the recent + # binutils and rest of the bootstrap tools, including GCC. stdenvLinuxBoot3 = stdenvBootFun { gcc = wrapGCC { - binutils = stdenvLinuxBoot1Pkgs.binutils; + binutils = binutils1; coreutils = bootstrapTools; libc = stdenvLinuxGlibc; }; @@ -231,12 +233,11 @@ rec { # 8) Construct a fourth stdenv identical to the second, except that - # this one uses the dynamically linked GCC and Binutils from step - # 5. The other tools (e.g. coreutils) are still from the - # bootstrap tools. + # 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 { - inherit (stdenvLinuxBoot3Pkgs) binutils; + binutils = binutils1; coreutils = bootstrapTools; libc = stdenvLinuxGlibc; gcc = stdenvLinuxBoot3Pkgs.gcc.gcc; @@ -258,9 +259,9 @@ rec { }; - # 10) Construct the final stdenv. It uses the Glibc, GCC and - # Binutils built above, and adds in dynamically linked versions - # of all other tools. + # 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. # # When updating stdenvLinux, make sure that the result has no # dependency (`nix-store -qR') on bootstrapTools or the @@ -281,8 +282,7 @@ rec { ++ [stdenvLinuxBoot4Pkgs.patchelf]; gcc = wrapGCC rec { - inherit (stdenvLinuxBoot3Pkgs) binutils; - inherit (stdenvLinuxBoot4Pkgs) coreutils; + inherit (stdenvLinuxBoot4Pkgs) binutils coreutils; libc = stdenvLinuxGlibc; gcc = stdenvLinuxBoot4.gcc.gcc; shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash"; |