Various packages under minimal-bootstrap explicitly use the musl gcc
wrapper (especially the *-static packages).
In #494106, the desire is to allow these packages to run on a host
platform which may differ from the bootstrap seed platform. That host
platform may be a non-musl platform, and furthermore musl may not even
be available on the desired host architecture.
This change aims to make the packages more generic wrt libc. It is
extracted out of #494106.
gccgo is built by overriding gcc from stdenv stage3. At this stage of
stdenv, when minimal-bootstrap is used as the bootstrap seed, the grep
package is actually gnugrep-static from minimal-bootstrap. This package
was accidentally missing egrep and fgrep.
Now, the gcc configure system is capable of detecting that grep -E
works as an egrep substitute. Still, a few makefiles were using egrep
directly rather than grep -E. This ultimately broke the gccgo build in
a subtle way.
Remove the empty share directory left behind after pruning installed coreutils documentation. The stage0 bootstrap path only needs the single static coreutils binary and symlink entry points.
Size impact against the previous trimmed output:
- coreutils-static closure: 2,250,112 B -> 2,249,944 B (-168 B)
Assisted-by: codex with gpt-5.5-high
Remove installed shell completion, documentation, and man page. The stage0 bootstrap path only needs the static patchelf binary.
Size impact after the compiler-reference cleanup:
- patchelf-static closure: 1.237 MiB -> 1.225 MiB (-0.012 MiB)
Assisted-by: codex with gpt-5.5-high
Remove the installed man page. The stage0 bootstrap path only needs the static patch binary.
Size impact against upstream/staging:
- gnupatch-static closure: 0.273 MiB -> 0.241 MiB (-0.032 MiB)
Assisted-by: codex with gpt-5.5-high
Disable NLS and remove installed documentation. The stage0 bootstrap path only needs the static sed binary.
Size impact against upstream/staging:
- gnused-static closure: 0.480 MiB -> 0.276 MiB (-0.204 MiB)
Assisted-by: codex with gpt-5.5-high
Remove installed info and man pages. The stage0 bootstrap path only needs the static gzip binary.
Size impact against upstream/staging:
- gzip-static closure: 0.249 MiB -> 0.175 MiB (-0.073 MiB)
Assisted-by: codex with gpt-5.5-high