From: Kai Kang Date: Fri, 10 Jun 2022 06:54:38 +0000 (+0800) Subject: xxhash: fix build with gcc 12 X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3884 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3464c67cd34acbb1a6705369e34dee8af7e348ac;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git xxhash: fix build with gcc 12 It fails to compile xxhash when '-Og' is set in CFLAGS via such as set DEBUG_BUILD = '1' in local.conf. Check and disable inline when '-Og' exists. Signed-off-by: Kai Kang Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-support/xxhash/xxhash_0.8.1.bb b/meta/recipes-support/xxhash/xxhash_0.8.1.bb index b3b97025987..222ba7b77c9 100644 --- a/meta/recipes-support/xxhash/xxhash_0.8.1.bb +++ b/meta/recipes-support/xxhash/xxhash_0.8.1.bb @@ -14,6 +14,8 @@ SRCREV = "35b0373c697b5f160d3db26b1cbb45a0d5ba788c" S = "${WORKDIR}/git" +CFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Og', '-DXXH_NO_INLINE_HINTS', '', d)}" + do_compile () { oe_runmake all }