commit: 0f89480cd25e09e4cc76328a61763fc1a3bd6aa0 Author: Joe Kappus <joe <AT> wt <DOT> gd> AuthorDate: Mon Nov 10 07:09:14 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Nov 11 04:48:04 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f89480c
app-arch/par2cmdline-turbo: fix -Og compiling So this package does forced-inlining for reasons. This sets a new macro added by patch that disables it when -Og is present. I'm following the lead from xxHash in https://bugs.gentoo.org/961093 Closes: https://bugs.gentoo.org/961901 Signed-off-by: Joe Kappus <joe <AT> wt.gd> Part-of: https://github.com/gentoo/gentoo/pull/44566 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/par2cmdline-turbo-no-inline-hints.patch | 42 ++++++++++++++++++++++ .../par2cmdline-turbo-1.3.0.ebuild | 11 +++++- .../par2cmdline-turbo-9999.ebuild | 11 +++++- 3 files changed, 62 insertions(+), 2 deletions(-) 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 000000000000..7241fce1a673 --- /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 <[email protected]> +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 <[email protected]> +--- + 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 244a28d1bb48..506fd9fe034f 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 df26ec95a4f4..c40403da6c4d 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 +}
