dev-util/perf: fix build failure with LTO

Closes: https://bugs.gentoo.org/951151
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
This commit is contained in:
Guilherme Amadio
2025-04-05 12:09:34 +02:00
parent bde4744ed8
commit 4ef45fcf6e
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
Adapted to v6.14 from patch submitted upstream:
https://lore.kernel.org/all/20250321082038.27901-2-holger@applied-asynchrony.com/
Bug: https://bugs.gentoo.org/951151
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -820,7 +820,7 @@ else
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null)
PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS))
- PERL_EMBED_CCOPTS := $(filter-out -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS))
+ PERL_EMBED_CCOPTS := $(filter-out -flto=% -ffat-lto-objects, $(PERL_EMBED_CCOPTS))
PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS))
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)

View File

@@ -185,6 +185,7 @@ src_prepare() {
pushd "${S_K}" >/dev/null || die
# Gentoo patches go here
eapply "${FILESDIR}"/${P}-lto.patch
popd || die
# Drop some upstream too-developer-oriented flags and fix the