commit: 0c86cb0e9f49d92d979086211eefdbf641a44c94 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Aug 11 12:29:30 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Aug 11 12:30:20 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c86cb0e
dev-libs/xxhash: fix build with -Og -Og inlines much less so always_inline doesn't mix well with it. Per the upstream README, pass -DXXH_NO_INLINE_HINTS with -Og. Also, for tests, we have to inject CPPFLAGS into CFLAGS, otherwise test_sanity fails on the same issue (can't build). Committing this now so toralf's worker is unblocked. Closes: https://bugs.gentoo.org/961093 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/xxhash/xxhash-0.8.3.ebuild | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev-libs/xxhash/xxhash-0.8.3.ebuild b/dev-libs/xxhash/xxhash-0.8.3.ebuild index f37f8df2867d..1ba92035c3f8 100644 --- a/dev-libs/xxhash/xxhash-0.8.3.ebuild +++ b/dev-libs/xxhash/xxhash-0.8.3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit multilib-minimal toolchain-funcs +inherit flag-o-matic multilib-minimal toolchain-funcs DESCRIPTION="Extremely fast non-cryptographic hash algorithm" HOMEPAGE="https://xxhash.com/" @@ -20,12 +20,20 @@ src_prepare() { multilib_copy_sources } +src_configure() { + # Needed for -Og to be buildable, otherwise fails a/ always_inline (bug #961093) + # https://github.com/Cyan4973/xxHash?tab=readme-ov-file#binary-size-control + is-flagq '-Og' && append-cppflags -DXXH_NO_INLINE_HINTS + multilib-minimal_src_configure +} + multilib_src_compile() { emake AR="$(tc-getAR)" CC="$(tc-getCC)" } multilib_src_test() { - emake CC="$(tc-getCC)" check + # Injecting CPPFLAGS into CFLAGS is needed for test_sanity + emake CC="$(tc-getCC)" CFLAGS="${CPPFLAGS} ${CFLAGS}" check } multilib_src_install() {
