All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xxhash: fix build with gcc 12
@ 2022-06-10  6:54 kai.kang
  0 siblings, 0 replies; only message in thread
From: kai.kang @ 2022-06-10  6:54 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

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>
---
 meta/recipes-support/xxhash/xxhash_0.8.1.bb | 2 ++
 1 file changed, 2 insertions(+)

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
 }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-10  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10  6:54 [PATCH] xxhash: fix build with gcc 12 kai.kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.