diff --git a/dev-util/perf/files/perf-6.14-lto.patch b/dev-util/perf/files/perf-6.14-lto.patch new file mode 100644 index 0000000000000..e5e54fd00b22d --- /dev/null +++ b/dev-util/perf/files/perf-6.14-lto.patch @@ -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) + diff --git a/dev-util/perf/perf-6.14.ebuild b/dev-util/perf/perf-6.14.ebuild index 853641e485083..99e4b1b918cea 100644 --- a/dev-util/perf/perf-6.14.ebuild +++ b/dev-util/perf/perf-6.14.ebuild @@ -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