Skip to content

Commit

Permalink
stdenvBootstrapTools: Bundle all *.o files from libc
Browse files Browse the repository at this point in the history
Include all runtime object files in output package, enabling different
kinds of build modes - non-PIE, PIE, static PIE and profile-generated.

Suggested by @trofi:
NixOS#252310 (comment)
  • Loading branch information
chivay committed Sep 7, 2023
1 parent eb05c5b commit 3cc00c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/stdenv/linux/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ in with pkgs; rec {
cp -d ${libc.out}/lib/libutil*.so* $out/lib
cp -d ${libc.out}/lib/libnss*.so* $out/lib
cp -d ${libc.out}/lib/libresolv*.so* $out/lib
cp -d ${libc.out}/lib/crt?.o $out/lib
# Copy all runtime files to enable non-PIE, PIE, static PIE and profile-generated builds
cp -d ${libc.out}/lib/*.o $out/lib
# Hacky compat with our current unpack-bootstrap-tools.sh
ln -s librt.so "$out"/lib/librt-dummy.so
Expand Down

0 comments on commit 3cc00c9

Please sign in to comment.