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 stdenv/cross: remove now-redundant file nativeBuildInput on mingw 2022-06-06 11:26:46 -07:00
custom
cygwin
darwin stdenvBootstrapTools: native aarch64-darwin build 2023-02-11 20:11:55 +01:00
freebsd config.contentAddressedByDefault: init option 2022-04-27 23:21:32 +03:00
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 stdenv/common-path.nix: move to stdenv/generic/ 2022-07-29 18:24:00 -04:00
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 llvmPackages_*: respect cc for target when choosing C++ flavour 2022-01-07 14:42:41 +01:00
default.nix stdenv: Simplify dispatch 2022-07-29 18:34:02 -04:00