diff --git a/app-arch/par2cmdline-turbo/files/par2cmdline-turbo-no-inline-hints.patch b/app-arch/par2cmdline-turbo/files/par2cmdline-turbo-no-inline-hints.patch new file mode 100644 index 0000000000000..7241fce1a6736 --- /dev/null +++ b/app-arch/par2cmdline-turbo/files/par2cmdline-turbo-no-inline-hints.patch @@ -0,0 +1,42 @@ +From 933d9984842605f5778768a388b25c53758b1d17 Mon Sep 17 00:00:00 2001 +From: Joe Kappus +Date: Mon, 10 Nov 2025 01:52:45 -0500 +Subject: [PATCH] Add a PAR2_NO_INLINE_HINTS macro to control disabling + inlining hints. + +Needed for compiling with -Og. I followed the general idea xxHash did: +https://github.com/Cyan4973/xxHash/commit/b8dfa44bbcce9d8c36c52996ec7073242e2aa04b + +Bug: https://bugs.gentoo.org/961901 +Signed-off-by: Joe Kappus +--- + parpar/src/hedley.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/parpar/src/hedley.h b/parpar/src/hedley.h +index 8a713e6..f7dd2b4 100644 +--- a/parpar/src/hedley.h ++++ b/parpar/src/hedley.h +@@ -1575,11 +1575,19 @@ HEDLEY_DIAGNOSTIC_POP + HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + HEDLEY_IAR_VERSION_CHECK(8,10,0) ++#ifdef PAR2_NO_INLINE_HINTS ++# define HEDLEY_ALWAYS_INLINE HEDLEY_INLINE ++#else + # define HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) HEDLEY_INLINE ++#endif + #elif \ + HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) ++#ifdef PAR2_NO_INLINE_HINTS ++# define HEDLEY_ALWAYS_INLINE ++#else + # define HEDLEY_ALWAYS_INLINE __forceinline ++#endif + #elif defined(__cplusplus) && \ + ( \ + HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ +-- +2.51.2 + diff --git a/app-arch/par2cmdline-turbo/par2cmdline-turbo-1.3.0.ebuild b/app-arch/par2cmdline-turbo/par2cmdline-turbo-1.3.0.ebuild index 244a28d1bb480..506fd9fe034fa 100644 --- a/app-arch/par2cmdline-turbo/par2cmdline-turbo-1.3.0.ebuild +++ b/app-arch/par2cmdline-turbo/par2cmdline-turbo-1.3.0.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools +inherit autotools flag-o-matic if [[ ${PV} == 9999 ]]; then inherit git-r3 @@ -23,7 +23,16 @@ RDEPEND=" !app-arch/par2cmdline " +PATCHES=("${FILESDIR}/${PN}-no-inline-hints.patch") + src_prepare() { default eautoreconf } + +src_configure() { + # Needed for -Og to be buildable, otherwise fails a/ always_inline (bug #961901)) + is-flagq '-Og' && append-cppflags -DPAR2_NO_INLINE_HINTS + + econf +} diff --git a/app-arch/par2cmdline-turbo/par2cmdline-turbo-9999.ebuild b/app-arch/par2cmdline-turbo/par2cmdline-turbo-9999.ebuild index df26ec95a4f47..c40403da6c4dc 100644 --- a/app-arch/par2cmdline-turbo/par2cmdline-turbo-9999.ebuild +++ b/app-arch/par2cmdline-turbo/par2cmdline-turbo-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools +inherit autotools flag-o-matic if [[ ${PV} == 9999 ]]; then inherit git-r3 @@ -23,7 +23,16 @@ RDEPEND=" !app-arch/par2cmdline " +PATCHES=("${FILESDIR}/${PN}-no-inline-hints.patch") + src_prepare() { default eautoreconf } + +src_configure() { + # Needed for -Og to be buildable, otherwise fails a/ always_inline (bug #961901)) + is-flagq '-Og' && append-cppflags -DPAR2_NO_INLINE_HINTS + + econf +}