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-filter-built-ins.patch.
Date: Mon, 23 Nov 2026 09:31:05 GMT	[thread overview]
Message-ID: <179542626501.1.15977935291949400298.rpms-rpm-7a3daadb269c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 7a3daadb269c0e027da2988a861b0b6b0a91a772
Author : Mark Wielaard <mjw@fedoraproject.org>
Date   : 2017-06-28T22:25:38+02:00
Stats  : +40/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/7a3daadb269c0e027da2988a861b0b6b0a91a772?branch=pmatilai-v6

Log:
Add find-debuginfo-filter-built-ins.patch.

---
diff --git a/find-debuginfo-filter-built-ins.patch b/find-debuginfo-filter-built-ins.patch
new file mode 100644
index 0000000..02903c2
--- /dev/null
+++ b/find-debuginfo-filter-built-ins.patch
@@ -0,0 +1,36 @@
+commit 78df22afc540c6c34003c3cb8ecc3ee686fbef76
+Author: Mark Wielaard <mark@klomp.org>
+Date:   Wed Jun 28 13:25:12 2017 +0200
+
+    find-debuginfo.sh: Filter out all <built-in> like fake file names.
+    
+    There is no official way to mark an instruction range as being not
+    part of some actual source code, but as part of a compiler built-in
+    construct in DWARF. So different compilers have come up with fake
+    source file names like <built-in> or <__thread_local_inner macros>.
+    We already filtered out the strings "<internal>" and "<built-in>".
+    Just filter out all '(^|/)<[a-z _-]+>$'. They are fake files!
+    
+    This is mainly to appease the rustc compiler which generates lots of
+    different variants to encode some instruction sequence is part of an
+    compiler generated macro expansion.
+    
+    Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
+index 0233d92..555e7b8 100755
+--- a/scripts/find-debuginfo.sh
++++ b/scripts/find-debuginfo.sh
+@@ -502,7 +502,11 @@ if [ -s "$SOURCEFILE" ]; then
+   fi
+ 
+   mkdir -p "${RPM_BUILD_ROOT}${debug_dest_name}"
+-  LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(<internal>|<built-in>)$' |
++  # Filter out anything compiler generated which isn't a source file.
++  # e.g. <internal>, <built-in>, <__thread_local_inner macros>.
++  # Some compilers generate them as if they are part of the working
++  # directory (which is why we match against ^ or /).
++  LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(^|/)<[a-z _-]+>$' |
+   (cd "${debug_base_name}"; cpio -pd0mL "${RPM_BUILD_ROOT}${debug_dest_name}")
+   # stupid cpio creates new directories in mode 0700,
+   # and non-standard modes may be inherented from original directories, fixup

diff --git a/rpm.spec b/rpm.spec
index 84114aa..9c57c6b 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -105,6 +105,9 @@ Patch286: debugsrc-and-sub-debuginfo-packages.patch
 # debugedit check prefix match ends with slash.
 Patch290: debugedit-prefix.patch
 
+# find-debuginfo.sh: Filter out all <built-in> like fake file names.
+Patch291: find-debuginfo-filter-built-ins.patch
+
 # OpenSSL backend
 Patch300: 0001-Add-OpenSSL-support-for-digest-and-signatures.patch
 
@@ -616,6 +619,7 @@ exit 0
 %changelog
 * Thu Jun 29 2017 Mark Wielaard <mjw@fedoraproject.org>
 - Add debugedit-prefix.patch.
+- Add find-debuginfo-filter-built-ins.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=179542626501.1.15977935291949400298.rpms-rpm-7a3daadb269c@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