Revert "Merge #160259: separateDebugInfo: Use --strip-unneeded"

This reverts commit 848091a52b734f2fb30c0e185befc31a2f3733de, reversing
changes made to ab0e692ac7d4284455410d542b560ae3600242f3.

It caused issues with elfutils tests,
probably through over-stripping of glibc parts.

+1 -40
+1 -1
pkgs/build-support/setup-hooks/separate-debug-info.sh
··· 34 # firmware blobs in QEMU.) 35 ( 36 $OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" 37 - $STRIP --strip-unneeded "$i" 38 39 # Also a create a symlink <original-name>.debug. 40 ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
··· 34 # firmware blobs in QEMU.) 35 ( 36 $OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" 37 + $STRIP --strip-debug "$i" 38 39 # Also a create a symlink <original-name>.debug. 40 ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
-2
pkgs/development/libraries/libpsl/default.nix
··· 3 , autoreconfHook 4 , docbook_xsl 5 , docbook_xml_dtd_43 6 - , glibc 7 , gtk-doc 8 , lzip 9 , libidn2 ··· 39 python3 40 libxslt 41 ] ++ lib.optionals enableValgrindTests [ 42 - glibc.debug 43 valgrind 44 ]; 45
··· 3 , autoreconfHook 4 , docbook_xsl 5 , docbook_xml_dtd_43 6 , gtk-doc 7 , lzip 8 , libidn2 ··· 38 python3 39 libxslt 40 ] ++ lib.optionals enableValgrindTests [ 41 valgrind 42 ]; 43
-31
pkgs/development/tools/analysis/valgrind/debug-info-from-env.patch
··· 1 - diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c 2 - index c586e3f33..e3bb1717f 100644 3 - --- a/coregrind/m_debuginfo/readelf.c 4 - +++ b/coregrind/m_debuginfo/readelf.c 5 - @@ -1508,13 +1508,25 @@ DiImage* find_debug_file( struct _DebugInfo* di, 6 - HChar* debugpath = NULL; /* where we found it */ 7 - 8 - if (buildid != NULL) { 9 - + const HChar *dir = VG_(getenv)("NIX_DEBUG_INFO_DIRS"); 10 - debugpath = ML_(dinfo_zalloc)("di.fdf.1", 11 - - VG_(strlen)(buildid) + 33); 12 - + VG_(strlen)(buildid) + 33 + 13 - + (dir ? VG_(strlen)(dir) : 0)); 14 - 15 - VG_(sprintf)(debugpath, "/usr/lib/debug/.build-id/%c%c/%s.debug", 16 - buildid[0], buildid[1], buildid + 2); 17 - 18 - dimg = open_debug_file(debugpath, buildid, 0, rel_ok, NULL); 19 - + 20 - + while (!dimg && dir) { 21 - + const HChar *sep = VG_(strchr)(dir, ':'); 22 - + Int size = sep ? sep - dir : VG_(strlen)(dir); 23 - + VG_(sprintf)(debugpath, "%.*s/.build-id/%c%c/%s.debug", 24 - + size, dir, buildid[0], buildid[1], buildid + 2); 25 - + dimg = open_debug_file(debugpath, buildid, 0, rel_ok, NULL); 26 - + dir = sep ? sep + 1 : NULL; 27 - + } 28 - + 29 - if (!dimg) { 30 - ML_(dinfo_free)(debugpath); 31 - debugpath = NULL;
···
-6
pkgs/development/tools/analysis/valgrind/default.nix
··· 1 { lib, stdenv, fetchurl, fetchpatch 2 , autoreconfHook, perl 3 , gdb, cctools, xnu, bootstrap_cmds 4 - , setupDebugInfoDirs 5 }: 6 7 stdenv.mkDerivation rec { ··· 20 url = "https://bugsfiles.kde.org/attachment.cgi?id=143535"; 21 sha256 = "036zyk30rixjvpylw3c7n171n4gpn6zcp7h6ya2dz4h5r478l9i6"; 22 }) 23 - ./debug-info-from-env.patch 24 ]; 25 26 outputs = [ "out" "dev" "man" "doc" ]; ··· 33 34 # Perl is also a native build input. 35 nativeBuildInputs = [ autoreconfHook perl ]; 36 - 37 - # Not propagatedNativeBuildInputs because of 38 - # https://github.com/NixOS/nixpkgs/issues/64992. 39 - propagatedBuildInputs = [ setupDebugInfoDirs ]; 40 41 enableParallelBuilding = true; 42 separateDebugInfo = stdenv.isLinux;
··· 1 { lib, stdenv, fetchurl, fetchpatch 2 , autoreconfHook, perl 3 , gdb, cctools, xnu, bootstrap_cmds 4 }: 5 6 stdenv.mkDerivation rec { ··· 19 url = "https://bugsfiles.kde.org/attachment.cgi?id=143535"; 20 sha256 = "036zyk30rixjvpylw3c7n171n4gpn6zcp7h6ya2dz4h5r478l9i6"; 21 }) 22 ]; 23 24 outputs = [ "out" "dev" "man" "doc" ]; ··· 31 32 # Perl is also a native build input. 33 nativeBuildInputs = [ autoreconfHook perl ]; 34 35 enableParallelBuilding = true; 36 separateDebugInfo = stdenv.isLinux;