[PATCH v4 3/8] gcc-runtime: avoid discarded-qualifiers build failure with glibc 2.43

Hemanth.KumarMD
2026-03-12T16:11:34Z

With the glibc 2.43 upgrade, building gcc-runtime triggers a
-Wdiscarded-qualifiers warning in libgomp/affinity-fmt.c which
becomes a build failure due to -Werror.

Add -Wno-error=discarded-qualifiers to CFLAGS as a workaround until
the upstream const-correctness issue in libgomp is resolved.

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
meta/recipes-devtools/gcc/gcc-runtime.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index c4e1c5b9a5..ef38cff58a 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -7,7 +7,8 @@ SUMMARY = "Runtime libraries from GCC"
LICENSE = "GPL-3.0-with-GCC-exception"

CXXFLAGS:remove = "-fvisibility-inlines-hidden"
-
+CFLAGS:append = " -Wno-error=discarded-qualifiers"
+
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=${includedir}/c++/${BINV} \
--with-sysroot=/not/exist \
--
2.49.0