public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nikita Popov <npopov@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/llvm] f45: Backport patch to fix bolt rpminspect failure
Date: Thu, 05 Nov 2026 15:46:51 GMT [thread overview]
Message-ID: <179389361131.1.3933103833513421737.rpms-llvm-db6bce83e8ab@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/llvm
Branch : f45
Commit : db6bce83e8abda4ff9bc16f73fa0d1714cb4a4ed
Author : Nikita Popov <npopov@redhat.com>
Date : 2026-10-15T12:18:40+02:00
Stats : +132/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/llvm/c/db6bce83e8abda4ff9bc16f73fa0d1714cb4a4ed?branch=f45
Log:
Backport patch to fix bolt rpminspect failure
Backports https://github.com/llvm/llvm-project/pull/231819 to
fix the rpminspect debuginfo failure on the merge-fdata binary.
[skip changelog]
---
diff --git a/80ef20addc82619c07b6deaec5f9995000b5dd16.patch b/80ef20addc82619c07b6deaec5f9995000b5dd16.patch
new file mode 100644
index 0000000..12258bd
--- /dev/null
+++ b/80ef20addc82619c07b6deaec5f9995000b5dd16.patch
@@ -0,0 +1,129 @@
+From 80ef20addc82619c07b6deaec5f9995000b5dd16 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <npopov@redhat.com>
+Date: Thu, 15 Oct 2026 09:13:33 +0200
+Subject: [PATCH] [bolt] Don't compile installed binary with --emit-relocs
+ (#231819)
+
+Bolt has a smoke-test that uses `merge-fdata` as a non-trivial binary.
+This requires it to be compiled with `--emit-relocs`. However, this is
+also an installed binary, so it ends up installed with relocations.
+
+This always ends up being flagged by our downstream binary analysis
+tooling. It would be easy enough to strip relocations and symbols on our
+side, but I don't think that the build system should be producing any
+"weird" installed binaries. Either we should automatically strip during
+installation, or we should not emit relocations for a binary that gets
+installed.
+
+I'm using the second approach here, compiling a separate
+merge-fdata-for-test binary that does not get installed. I assume that
+we're not particularly concerned about the cost of building an
+additional tiny binary here.
+---
+ bolt/test/CMakeLists.txt | 1 +
+ bolt/test/lit.cfg.py | 1 +
+ bolt/test/runtime/meta-merge-fdata.test | 12 ++++++------
+ bolt/tools/merge-fdata/CMakeLists.txt | 18 +++++++++++++++---
+ 4 files changed, 23 insertions(+), 9 deletions(-)
+
+diff --git a/bolt/test/CMakeLists.txt b/bolt/test/CMakeLists.txt
+index 64737901a0eaaa..efa90f20a88c84 100644
+--- a/bolt/test/CMakeLists.txt
++++ b/bolt/test/CMakeLists.txt
+@@ -54,6 +54,7 @@ list(APPEND BOLT_TEST_DEPS
+ llvm-strip
+ llvm-objcopy
+ merge-fdata
++ merge-fdata-for-test
+ not
+ split-file
+ yaml2obj
+diff --git a/bolt/test/lit.cfg.py b/bolt/test/lit.cfg.py
+index 30cfc8fa549018..f92631d071a9aa 100644
+--- a/bolt/test/lit.cfg.py
++++ b/bolt/test/lit.cfg.py
+@@ -132,6 +132,7 @@
+ ),
+ ToolSubst("process-debug-line", unresolved="fatal"),
+ ToolSubst("merge-fdata", unresolved="fatal"),
++ ToolSubst("merge-fdata-for-test", unresolved="fatal"),
+ ToolSubst("llvm-readobj", unresolved="fatal"),
+ ToolSubst("llvm-dwp", unresolved="fatal"),
+ ToolSubst("split-file", unresolved="fatal"),
+diff --git a/bolt/test/runtime/meta-merge-fdata.test b/bolt/test/runtime/meta-merge-fdata.test
+index 6972e75c64de7b..c117b8ce607b1a 100644
+--- a/bolt/test/runtime/meta-merge-fdata.test
++++ b/bolt/test/runtime/meta-merge-fdata.test
+@@ -1,4 +1,4 @@
+-# Meta test using merge-fdata binary
++# Meta test using merge-fdata-for-test binary
+ UNSUPPORTED: asan
+ # Instrumentation currently only works on X86
+ REQUIRES: x86_64-linux,bolt-runtime
+@@ -7,7 +7,7 @@ REQUIRES: x86_64-linux,bolt-runtime
+ # - Direct branches
+ # - Unmapped calls coming from uninstrumented code (libc)
+ # - Direct calls
+-RUN: llvm-bolt merge-fdata -o %t.inst --instrument \
++RUN: llvm-bolt merge-fdata-for-test -o %t.inst --instrument \
+ RUN: --instrumentation-file=%t.fdata
+
+ # Execute with no input
+@@ -20,7 +20,7 @@ RUN: cat %t.fdata1 | FileCheck %s --check-prefix=CHECK-FDATA
+ CHECK-FDATA: 0 [unknown] 0 1 _start 0 0 1
+
+ # Check that BOLT works with this profile
+-RUN: llvm-bolt merge-fdata -o %t.bolt --data %t.fdata1 \
++RUN: llvm-bolt merge-fdata-for-test -o %t.bolt --data %t.fdata1 \
+ RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
+ RUN: --split-functions 2>&1 \
+ RUN: | FileCheck %s --check-prefix=CHECK-BOLT1
+@@ -31,18 +31,18 @@ RUN: %t.inst --help
+ RUN: mv %t.fdata %t.fdata2
+
+ # Check profile coverage
+-RUN: llvm-boltdiff merge-fdata merge-fdata \
++RUN: llvm-boltdiff merge-fdata-for-test merge-fdata-for-test \
+ RUN: --data %t.fdata1 --data2 %t.fdata2 --display-count=20 | \
+ RUN: FileCheck %s --check-prefix=CHECK-BOLTDIFF
+ CHECK-BOLTDIFF: Inputs share [[#]] functions
+
+ # Check that instrumented binary produces the same result
+-RUN: merge-fdata %t.fdata1 %t.fdata2 > %t.fdata.base
++RUN: merge-fdata-for-test %t.fdata1 %t.fdata2 > %t.fdata.base
+ RUN: %t.inst %t.fdata1 %t.fdata2 > %t.fdata.inst
+ RUN: cmp %t.fdata.base %t.fdata.inst
+
+ # Optimize using merged fdata
+-RUN: llvm-bolt merge-fdata -o %t.opt --data %t.fdata.base \
++RUN: llvm-bolt merge-fdata-for-test -o %t.opt --data %t.fdata.base \
+ RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
+ RUN: --split-functions 2>&1 \
+ RUN: | FileCheck %s --check-prefix=CHECK-BOLT2
+diff --git a/bolt/tools/merge-fdata/CMakeLists.txt b/bolt/tools/merge-fdata/CMakeLists.txt
+index f6a87a2268982e..cfd991bc8ac058 100644
+--- a/bolt/tools/merge-fdata/CMakeLists.txt
++++ b/bolt/tools/merge-fdata/CMakeLists.txt
+@@ -11,7 +11,19 @@ add_bolt_tool(merge-fdata
+
+ add_dependencies(bolt merge-fdata)
+
+-# Emit relocations for BOLT meta test (bolt/test/runtime/meta-merge-fdata.test)
+-if (BOLT_INCLUDE_TESTS AND UNIX AND NOT APPLE)
+- target_link_options(merge-fdata PRIVATE LINKER:--emit-relocs)
++if (BOLT_INCLUDE_TESTS)
++ # Compile another binary using --emit-relocs for BOLT meta test in
++ # bolt/test/runtime/meta-merge-fdata.test.
++ set(EXCLUDE_FROM_ALL ON)
++ add_bolt_executable(merge-fdata-for-test
++ merge-fdata.cpp
++
++ DISABLE_LLVM_LINK_LLVM_DYLIB
++
++ DEPENDS
++ intrinsics_gen
++ )
++ if (UNIX AND NOT APPLE)
++ target_link_options(merge-fdata-for-test PRIVATE LINKER:--emit-relocs)
++ endif()
+ endif()
diff --git a/llvm.spec b/llvm.spec
index 0d12517..accdad1 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -627,6 +627,9 @@ Patch2207: 0001-AggressiveInstCombine-Fix-crash-when-folding-consecu.patch
# https://github.com/llvm/llvm-project/pull/227851
Patch2307: 227851.patch
+# Fix bolt rpminspect failure.
+Patch2308: 80ef20addc82619c07b6deaec5f9995000b5dd16.patch
+
%if 0%{?rhel} == 8
%global python3_pkgversion 3.12
%global __python3 /usr/bin/python3.12
reply other threads:[~2026-11-05 15:46 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=179389361131.1.3933103833513421737.rpms-llvm-db6bce83e8ab@fedoraproject.org \
--to=npopov@redhat.com \
--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