public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mark Wielaard <mjw@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Add find-debuginfo-dwz-multi.patch.
Date: Mon, 23 Nov 2026 09:31:05 GMT	[thread overview]
Message-ID: <179542626581.1.4450985233258685572.rpms-rpm-1501796e3fb0@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 1501796e3fb04cab1bb2af088495e244278487f4
Author : Mark Wielaard <mjw@fedoraproject.org>
Date   : 2017-06-28T23:05:54+02:00
Stats  : +54/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/1501796e3fb04cab1bb2af088495e244278487f4?branch=pmatilai-v6

Log:
Add find-debuginfo-dwz-multi.patch.

---
diff --git a/find-debuginfo-dwz-multi.patch b/find-debuginfo-dwz-multi.patch
new file mode 100644
index 0000000..e7a8c83
--- /dev/null
+++ b/find-debuginfo-dwz-multi.patch
@@ -0,0 +1,50 @@
+commit 0f162dc41f2051eab237bd223356d88e94a07580
+Author: Mark Wielaard <mark@klomp.org>
+Date:   Mon Jun 26 17:38:30 2017 +0200
+
+    find-debuginfo.sh: Don't create dwz multi file if there is only one .debug.
+    
+    dwz -m multi only works when there are multiple .debug input files.
+    With just one .debug file it doesn't really make sense to extract
+    the shared debug info into a separate file and dwz will complain:
+    
+      dwz: Too few files for multifile optimization.
+    
+    So only add -m multi if there is more than one .debug file.
+    
+    Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
+index 85a862f..360982d 100755
+--- a/scripts/find-debuginfo.sh
++++ b/scripts/find-debuginfo.sh
+@@ -458,8 +458,8 @@ fi
+ # Invoke the DWARF Compressor utility.
+ if $run_dwz \
+    && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
+-  dwz_files="`cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug`"
+-  if [ -n "${dwz_files}" ]; then
++  readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug)
++  if [ ${#dwz_files[@]} -gt 0 ]; then
+     dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
+     dwz_multifile_suffix=
+     dwz_multifile_idx=0
+@@ -468,14 +468,16 @@ if $run_dwz \
+       dwz_multifile_suffix=".${dwz_multifile_idx}"
+     done
+     dwz_multfile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
+-    dwz_opts="-h -q -r -m .dwz/${dwz_multifile_name}"
++    dwz_opts="-h -q -r"
++    [ ${#dwz_files[@]} -gt 1 ] \
++      && dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"
+     mkdir -p "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz"
+     [ -n "${dwz_low_mem_die_limit}" ] \
+       && dwz_opts="${dwz_opts} -l ${dwz_low_mem_die_limit}"
+     [ -n "${dwz_max_die_limit}" ] \
+       && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}"
+     if type dwz >/dev/null 2>&1; then
+-      ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts $dwz_files )
++      ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts ${dwz_files[@]} )
+     else
+       echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"
+       exit 2

diff --git a/rpm.spec b/rpm.spec
index 9c57c6b..1b0f3ca 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -108,6 +108,9 @@ Patch290: debugedit-prefix.patch
 # find-debuginfo.sh: Filter out all <built-in> like fake file names.
 Patch291: find-debuginfo-filter-built-ins.patch
 
+# Don't create dwz multi file if there is only one .debug.
+Patch292: find-debuginfo-dwz-multi.patch
+
 # OpenSSL backend
 Patch300: 0001-Add-OpenSSL-support-for-digest-and-signatures.patch
 
@@ -620,6 +623,7 @@ exit 0
 * Thu Jun 29 2017 Mark Wielaard <mjw@fedoraproject.org>
 - Add debugedit-prefix.patch.
 - Add find-debuginfo-filter-built-ins.patch.
+- Add find-debuginfo-dwz-multi.patch.
 
 * Wed Jun 28 2017 Mark Wielaard <mjw@fedoraproject.org> - 4.13.0.1-27
 - Add find-debuginfo-split-traversal-and-extraction-fix.patch (#1465170)

                 reply	other threads:[~2026-11-23  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542626581.1.4450985233258685572.rpms-rpm-1501796e3fb0@fedoraproject.org \
    --to=mjw@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox