minimal-bootstrap: drop patchelf compiler reference
Static patchelf does not need build-compiler paths in debug or source metadata. Add deterministic compiler flags and disallow references to the bootstrap compiler. Size impact against upstream/staging: - patchelf-static closure: 167.634 MiB -> 1.237 MiB (-166.397 MiB) Assisted-by: codex with gpt-5.5-high
This commit is contained in:
@@ -43,6 +43,8 @@ bash.runCommand "${pname}-${version}"
|
||||
gzip
|
||||
];
|
||||
|
||||
disallowedReferences = [ gcc ];
|
||||
|
||||
passthru.tests.get-version =
|
||||
result:
|
||||
bash.runCommand "${pname}-get-version-${version}" { } ''
|
||||
@@ -70,7 +72,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--host=${hostPlatform.config} \
|
||||
--disable-dependency-tracking \
|
||||
CC=musl-gcc \
|
||||
CXXFLAGS=-static
|
||||
CXXFLAGS="-static -g0 -O2 -DNDEBUG -ffile-prefix-map=${gcc}=. -fmacro-prefix-map=${gcc}=."
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
Reference in New Issue
Block a user