summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2022-06-10 14:54:38 +0800
committerSteve Sakoman <steve@sakoman.com>2022-06-15 04:33:06 -1000
commitd8e454b370089e4a33c8373742178ef4d540e848 (patch)
tree0873162f8caecdb1a8ba00f46a23bb107c4a1b62
parentd8cb65b2aee311cad4d174e0770bcb6ef51bedf5 (diff)
downloadopenembedded-core-contrib-d8e454b370089e4a33c8373742178ef4d540e848.tar.gz
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 <kai.kang@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3464c67cd34acbb1a6705369e34dee8af7e348ac) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-support/xxhash/xxhash_0.8.1.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-support/xxhash/xxhash_0.8.1.bb b/meta/recipes-support/xxhash/xxhash_0.8.1.bb
index b3b9702598..222ba7b77c 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
}