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
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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