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/os-specific/linux/musl/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/os-specific/linux/musl/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/musl/default.nix | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index fb0d19115da..b73c0ae04cd 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -102,15 +102,11 @@ stdenv.mkDerivation rec { # Apparently glibc provides scsi itself? (cd $dev/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .) - # Strip debug out of the static library - $STRIP -S $out/lib/libc.a mkdir -p $out/bin - ${if (stdenv.targetPlatform.libc == "musl" && stdenv.targetPlatform.isx86_32) then - "install -D libssp_nonshared.a $out/lib/libssp_nonshared.a - $STRIP -S $out/lib/libssp_nonshared.a" - else "" + ${lib.optionalString (stdenv.targetPlatform.libc == "musl" && stdenv.targetPlatform.isx86_32) + "install -D libssp_nonshared.a $out/lib/libssp_nonshared.a" } # Create 'ldd' symlink, builtin |