Re: [oe] [PATCH] redis: fix build of the bundled xxHash with -Og
Khem Raj <[email protected]>
| Newsgroups | org.openembedded.lists.openembedded-devel |
|---|---|
| Message-ID | <CAMKF1sq_Rbg3gs2E4C+SUexJ3xZkkQ57hJP_NpeUt4wXZY2Ycw@mail.gmail.com> |
On Sun, Aug 16, 2026 at 9:40 AM Ricardo Salveti via lists.openembedded.org <[email protected]> wrote: > redis 8.8 started bundling a post-0.8.3 xxHash snapshot in deps/xxhash, > which is built and linked into redis-server. Its XXH3 accumulate and > scramble routines are marked always_inline but are only ever reached > through function pointers, so the compiler has to resolve the indirect > call before it can honour the attribute. > > xxHash drops those inline hints on its own when __NO_INLINE__ is > defined, which covers -O0 and -fno-inline, but nothing covers -Og. > Recent GCC no longer resolves the indirect calls at that optimisation > level, so every build with DEBUG_BUILD = "1" fails: > > xxhash.h:5476:1: error: inlining failed in call to 'always_inline' > 'XXH3_scrambleAcc_neon': function not considered for inlining > make[2]: *** [Makefile:108: xxhash] Error 2 > ld: cannot find ../deps/xxhash/libxxhash.a: No such file or directory > > Upstream xxHash closed this as not fixable in code (Cyan4973/xxHash#943) > and instead documents XXH_NO_INLINE_HINTS as the supported way to > compile with -Og. Define it when -Og is the selected optimisation, > leaving regular builds untouched so xxHash keeps its inline hints there. > > AI-Generated: Uses Claude Code > Signed-off-by: Ricardo Salveti <[email protected]> > --- > meta-oe/recipes-extended/redis/redis_8.10.0.bb | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/meta-oe/recipes-extended/redis/redis_8.10.0.bb > b/meta-oe/recipes-extended/redis/redis_8.10.0.bb > index 6176dc45be..3edaa9155c 100644 > --- a/meta-oe/recipes-extended/redis/redis_8.10.0.bb > +++ b/meta-oe/recipes-extended/redis/redis_8.10.0.bb > @@ -43,6 +43,14 @@ EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" > > TARGET_LDFLAGS:append = " ${DEBUG_PREFIX_MAP}" > > +# The bundled xxHash marks its XXH3 vector paths always_inline but only > reaches > +# them through function pointers. It drops the inline hints on its own > when > +# __NO_INLINE__ is defined (-O0, -fno-inline) but never for -Og, and > recent GCC > +# no longer resolves those indirect calls at -Og, so deps/xxhash fails to > +# build. Upstream xxHash closed this as not fixable in code and documents > +# XXH_NO_INLINE_HINTS as the supported way to compile with -Og. > +CFLAGS:append = "${@' -DXXH_NO_INLINE_HINTS' if '-Og' in > (d.getVar('SELECTED_OPTIMIZATION') or '') else ''}" > + > I see that its fixed in xxhash recipe in oe-core CFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Og', '-DXXH_NO_INLINE_HINTS', '', d)}" I wonder if its better to depend on system xxhash instead of using vendored version. Please explore if that option is possible. > do_compile:prepend() { > oe_runmake -C deps hdr_histogram fpconv hiredis lua linenoise > } > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#129176): > https://lists.openembedded.org/g/openembedded-devel/message/129176 > Mute This Topic: https://lists.openembedded.org/mt/120778093/1997914 > Group Owner: [email protected] > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ > [email protected]] > -=-=-=-=-=-=-=-=-=-=-=- > >