stdenv: add -stageX markers to gmp, mpfr, libmpc, and isl
This commit is contained in:
parent
a9e0d86411
commit
02630180fa
|
@ -304,14 +304,18 @@ in
|
||||||
binutils coreutils gnugrep
|
binutils coreutils gnugrep
|
||||||
perl patchelf linuxHeaders gnum4 bison libidn2 libunistring;
|
perl patchelf linuxHeaders gnum4 bison libidn2 libunistring;
|
||||||
${localSystem.libc} = getLibc prevStage;
|
${localSystem.libc} = getLibc prevStage;
|
||||||
gcc-unwrapped = super.gcc-unwrapped.override {
|
gcc-unwrapped =
|
||||||
|
let makeStaticLibrariesAndMark = pkg:
|
||||||
|
lib.makeOverridable (pkg.override { stdenv = self.makeStaticLibraries self.stdenv; })
|
||||||
|
.overrideAttrs (a: { pname = "${a.pname}-stage3"; });
|
||||||
|
in super.gcc-unwrapped.override {
|
||||||
# Link GCC statically against GMP etc. This makes sense because
|
# Link GCC statically against GMP etc. This makes sense because
|
||||||
# these builds of the libraries are only used by GCC, so it
|
# these builds of the libraries are only used by GCC, so it
|
||||||
# reduces the size of the stdenv closure.
|
# reduces the size of the stdenv closure.
|
||||||
gmp = super.gmp.override { stdenv = self.makeStaticLibraries self.stdenv; };
|
gmp = makeStaticLibrariesAndMark super.gmp;
|
||||||
mpfr = super.mpfr.override { stdenv = self.makeStaticLibraries self.stdenv; };
|
mpfr = makeStaticLibrariesAndMark super.mpfr;
|
||||||
libmpc = super.libmpc.override { stdenv = self.makeStaticLibraries self.stdenv; };
|
libmpc = makeStaticLibrariesAndMark super.libmpc;
|
||||||
isl = super.isl_0_20.override { stdenv = self.makeStaticLibraries self.stdenv; };
|
isl = makeStaticLibrariesAndMark super.isl_0_20;
|
||||||
# Use a deterministically built compiler
|
# Use a deterministically built compiler
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/108475 for context
|
# see https://github.com/NixOS/nixpkgs/issues/108475 for context
|
||||||
reproducibleBuild = true;
|
reproducibleBuild = true;
|
||||||
|
@ -349,10 +353,10 @@ in
|
||||||
# force gmp to rebuild so we have the option of dynamically linking
|
# force gmp to rebuild so we have the option of dynamically linking
|
||||||
# libgmp without creating a reference path from:
|
# libgmp without creating a reference path from:
|
||||||
# stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap
|
# stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap
|
||||||
gmp = super.gmp.override { stdenv = self.stdenv; };
|
gmp = lib.makeOverridable (super.gmp.override { stdenv = self.stdenv; }).overrideAttrs (a: { pname = "${a.pname}-stage4"; });
|
||||||
|
|
||||||
# coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion
|
# coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion
|
||||||
coreutils = super.coreutils.overrideAttrs (_: { pname = "coreutils-stage4"; });
|
coreutils = super.coreutils.overrideAttrs (a: { pname = "${a.pname}-stage4"; });
|
||||||
|
|
||||||
gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
|
|
Loading…
Reference in a new issue