diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-08-07 09:05:33 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-08-07 12:49:37 +0100 |
commit | b3b672d5a16a0e99dc112b9f65436555b11c3ab7 (patch) | |
tree | 0742d0f2240ca07aa5482e6106401b4dce5823c4 /pkgs/development/libraries/glibc/default.nix | |
parent | cfd4ea64f48a846525e3b7bc0e2074ffbce6b1ce (diff) | |
download | nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar.gz nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar.bz2 nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar.lz nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar.xz nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.tar.zst nixpkgs-b3b672d5a16a0e99dc112b9f65436555b11c3ab7.zip |
setup-hooks/separate-debug-info.sh: don't inhibit strip hook
Before the change separate-debug-info.sh did the stripping itself. This scheme has a few problems: 1. Stripping happens only on ELF files. *.a and *.o files are skipped. Derivations have to do it manually. Usually incorrectly as they don't run $RANLIB (true for `glibc` and `musl`). 2. Stripping happens on all paths. Ideally only `stripDebugList` paths should be considered. 3. Host strip is called on Target files. This change offloads stripping logic to strip hook. This strips more files for `glibc` and `musl`. Now we can remove most $STRIP calls from individual derivations. Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/libraries/glibc/default.nix')
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index ba782321559..f815e1eaa47 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -127,15 +127,6 @@ callPackage ./common.nix { inherit stdenv; } { ln -sf $out/lib/libdl.so.2 $out/lib/libdl.so ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so touch $out/lib/libpthread.a - '' - # For some reason these aren't stripped otherwise and retain reference - # to bootstrap-tools; on cross-arm this stripping would break objects. - + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' - - for i in "$out"/lib/*.a; do - [ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i" - done - '' + '' # Put libraries for static linking in a separate output. Note # that libc_nonshared.a and libpthread_nonshared.a are required |