3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/stdenv
Adam Joseph d7fe0a5548 make-bootstrap-tools.nix: use a patchelf built with -static-{libgcc,libstdc++}
Our bootstrap-files unpacker has always relied on a lot of unstated
assumptions, one of them being that every library has a DT_NEEDED
for librt.so, so patchelf'ing something into the RUNPATH into
librt.so means that it will be searched for every library load in
all of the bootstrap-files.

Unfortunately that assumption is not true for libgcc.

This causes problems, because patchelf links against libgcc (and
against libstdc++, which links against libgcc).  So we can't use
patchelf on libgcc, because it needs libgcc, so patchelf doesn't
work until libgcc is patchelfed.

The robust solution here is to use static linking for the copy of
patchelf that is shipped with the bootstrap-files.  We don't have to
go all the way to a statically linked libc; just -static-libgcc and
-static-libstdc++ are enough to break the circular dependency.
2023-04-02 13:49:53 -07:00
..
cross
custom
cygwin
darwin stdenvBootstrapTools: native aarch64-darwin build 2023-02-11 20:11:55 +01:00
freebsd
generic mkDerivation: do not disable separateDebugInfo on LLVM stdenvs 2023-02-25 12:49:40 -06:00
linux make-bootstrap-tools.nix: use a patchelf built with -static-{libgcc,libstdc++} 2023-04-02 13:49:53 -07:00
native treewide: use lib.optionals 2023-02-14 19:11:59 +01:00
nix
tests stdenv.tests: Add succeedOnFailure 2022-11-14 19:03:35 +01:00
adapters.nix Merge staging-next into staging 2023-02-23 18:01:49 +00:00
booter.nix
default.nix