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.
Disable NLS and remove installed documentation after keeping only the grep binary. The existing egrep and fgrep pruning remains in place.
Size impact against upstream/staging:
- gnugrep-static closure: 0.546 MiB -> 0.381 MiB (-0.165 MiB)
Assisted-by: codex with gpt-5.5-high
Adds --enable-checking=release and --disable-{libgomp,libquadmath,libitm,libvtv,libssp,libatomic,libstdcxx-pch,nls} to all GCCs (those runtime libs are unused by the stdenv); switches gcc-4.6{,cxx} to install-strip; adds --disable-nls to binutils and coreutils; adds --disable-test-modules --without-ensurepip --without-static-libpython to python.
Bootstrap self-size 1.45 GB -> 940 MB; gcc46-cxx -14%, glibc -10%, gcc-latest -6% wall on the heavy builds.
(make -j was tried on tcc-built derivations and broke them silently; NOTE comments left in the affected files so this isn't re-attempted.)
By default, stdenv runs configure using --disable-dependency-tracking.
This commit adds the same flag to most manual invocations of autotools
configure scripts in minimal-bootstrap.
However, the flag does not apply to musl & zlib, which come with
handwritten configure scripts. It also does not apply to Python, where
the dependency tracking feature is already disabled in automake config.
- bash upgraded to 5.2.37, which fixes broken logic in the configure script
relating to strtoimax.
- heirloom stubs fixed to be static, which removes linker issues
- Fixed xz linker issues, stemming from configure script issues
- gnugrep uses broken Makefile from live-bootstrap; vendor a fixed version
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH