Skip to contentSkip to conversation

ncurses: Always pass -D_GNU_SOURCE

PATCH New Khem Raj 1 participant 1 message Feb 21, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ncurses: Always pass -D_GNU_SOURCE

So far it was assumed that it was detected ok for target recipe but actually it ends up with warnings and build moves on, however with gcc-14 these warnings are treated as errors and we see the problem even with target recipes.

---
 meta/recipes-core/ncurses/ncurses.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +2 -4
index 367f3b19f48..761b6a3d312 100644
@@ -27,10 +27,8 @@ EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
 # TODO: remove this variable when widec is supported in every setup?
 ENABLE_WIDEC ?= "true"
 
-# _GNU_SOURCE is required for widec stuff and is detected automatically
-# for target objects.  But it must be set manually for native and sdk
-# builds.
-BUILD_CPPFLAGS += "-D_GNU_SOURCE"
+# _GNU_SOURCE is required for widec stuff and is not detected automatically
+CPPFLAGS += "-D_GNU_SOURCE"
 
 # natives don't generally look in base_libdir
 base_libdir:class-native = "${libdir}"
Signature · 1 line
2.43.2