Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"

This reverts commit 0a944b345e, reversing
changes made to 61733ed6cc.

I dislike these massive stdenv changes with unclear motivation,
especially when they involve gratuitous mass renames like NIX_CC ->
NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused
months of pain, so let's not do that again.
This commit is contained in:
Eelco Dolstra
2017-09-07 12:22:33 +02:00
parent d38ee5b46c
commit ec8d41f08c
183 changed files with 548 additions and 881 deletions

View File

@@ -143,16 +143,7 @@ in
'';
};
gcc-unwrapped = bootstrapTools;
binutils = import ../../build-support/binutils-wrapper {
nativeTools = false;
nativeLibc = false;
buildPackages = { };
libc = self.glibc;
inherit (self) coreutils gnugrep;
binutils = bootstrapTools;
name = "bootstrap-binutils-wrapper";
stdenv = self.stdenv;
};
binutils = bootstrapTools;
coreutils = bootstrapTools;
gnugrep = bootstrapTools;
};
@@ -174,7 +165,7 @@ in
# Rebuild binutils to use from stage2 onwards.
overrides = self: super: {
binutils = super.binutils_nogold;
binutils = super.binutils.override { gold = false; };
inherit (prevStage)
ccWrapperStdenv
glibc gcc-unwrapped coreutils gnugrep;
@@ -197,14 +188,9 @@ in
overrides = self: super: {
inherit (prevStage)
ccWrapperStdenv
gcc-unwrapped coreutils gnugrep
binutils gcc-unwrapped coreutils gnugrep
perl paxctl gnum4 bison;
# This also contains the full, dynamically linked, final Glibc.
binutils = prevStage.binutils.override {
# Rewrap the binutils with the new glibc, so both the next
# stage's wrappers use it.
libc = self.glibc;
};
};
})
@@ -249,15 +235,6 @@ in
# other purposes (binutils and top-level pkgs) too.
inherit (prevStage) gettext gnum4 bison gmp perl glibc zlib linuxHeaders;
binutils = super.binutils.override {
# Don't use stdenv's shell but our own
shell = self.bash + "/bin/bash";
# Build expand-response-params with last stage like below
buildPackages = {
inherit (prevStage) stdenv;
};
};
gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
nativeTools = false;
nativeLibc = false;
@@ -322,8 +299,8 @@ in
allowedRequisites = with prevStage; with lib;
# Simple executable tools
concatMap (p: [ (getBin p) (getLib p) ])
[ gzip bzip2 xz bash binutils.binutils coreutils diffutils findutils
gawk gnumake gnused gnutar gnugrep gnupatch patchelf ed paxctl
[ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk
gnumake gnused gnutar gnugrep gnupatch patchelf ed paxctl
]
# Library dependencies
++ map getLib (
@@ -333,7 +310,7 @@ in
# More complicated cases
++ [
glibc.out glibc.dev glibc.bin/*propagated from .dev*/ linuxHeaders
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
gcc gcc.cc gcc.cc.lib gcc.expand-response-params
]
++ lib.optionals (system == "aarch64-linux")
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];