libc: wipe out all references from copied libgcc_s.so.1

Without the change a copy from freshly built `gcc` still retains a
reference even after `patchelf --remove-rpath` because `patchelf` does
not cleanup dynamic sprintgs section.

The change stubs the reference out and fixes build on bootstraps where
`gcc` is built before `glibc`.
This commit is contained in:
Sergei Trofimovich 2023-01-14 17:38:50 +00:00
parent d4d82a6ef2
commit 6728277e19

View File

@ -86,6 +86,9 @@ in
# rely on default RUNPATHs of the binary and other libraries
# Do no force-pull wrong glibc.
patchelf --remove-rpath $out/lib/libgcc_s.so.1
# 'patchelf' does not remove the string itself. Wipe out
# string reference to avoid possible link to bootstrapTools
${buildPackages.nukeReferences}/bin/nuke-refs $out/lib/libgcc_s.so.1
fi
'';