forked from mirrors/nixpkgs
d7fe0a5548
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. |
||
---|---|---|
.. | ||
cross | ||
custom | ||
cygwin | ||
darwin | ||
freebsd | ||
generic | ||
linux | ||
native | ||
nix | ||
tests | ||
adapters.nix | ||
booter.nix | ||
default.nix |