Skip to contentSkip to conversation

inetutils: Disable format-security warning as error with clang

PATCH New Khem Raj 1 participant 1 message Apr 3

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 inetutils: Disable format-security warning as error with clang

From: Khem Raj <[email protected]>

GCC treats returns from _() as special since they are checked by msgfmt-c and it knows this can be ignored, clang however does not have this construct [1] and with latest clang-22 finds more warnings and since in OE we turn these warnings into errors the build fails.

Given that this is an addressed case, let clang not treat these warnings as errors, we still see the diagnostic we just don't break the build.

[1] https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00093.html

---
 meta/recipes-connectivity/inetutils/inetutils_2.7.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-connectivity/inetutils/inetutils_2.7.bb +2 -0
index 716174e299..e555e318a8 100644
@@ -50,6 +50,8 @@ EXTRA_OECONF:append:libc-musl = " --with-path-utmpx=/dev/null/utmpx --with-path-
 EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \
         --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
 
+SECURITY_STRINGFORMAT:remove:toolchain-clang = "-Werror=format-security"
+
 # The configure script guesses many paths in cross builds, check for this happening
 do_configure_cross_check() {
     if grep "may be incorrect because of cross-compilation" ${B}/config.log; then