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.
Drop unused installed libraries and headers, avoid building unused gprof/libctf components, and replace duplicate target-prefixed tools with symlinks while keeping the conventional paths available.
Size impact against upstream/staging:
- binutils-static closure: 42.482 MiB -> 21.093 MiB (-21.389 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.