[PATCH v2 3/3] selftests/nolibc: test against -Wwrite-strings
From: Thomas Weißschuh
Date: Mon May 25 2026 - 04:28:44 EST
Users may use this warning when building their own applications.
Make sure that nolibc does not trigger any such warnings.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
Acked-by: Willy Tarreau <w@xxxxxx>
---
tools/testing/selftests/nolibc/Makefile.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile.include b/tools/testing/selftests/nolibc/Makefile.include
index 96fe2bc2191e..c30ca3a9ef14 100644
--- a/tools/testing/selftests/nolibc/Makefile.include
+++ b/tools/testing/selftests/nolibc/Makefile.include
@@ -6,7 +6,7 @@ _CFLAGS_STACKPROTECTOR ?= $(call try-run, \
$(__CFLAGS_STACKPROTECTOR))
_CFLAGS_SANITIZER ?= $(call cc-option,-fsanitize=undefined -fsanitize-trap=all)
CFLAGS_NOLIBC_TEST ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \
- -W -Wall -Wextra -Wundef \
+ -W -Wall -Wextra -Wundef -Wwrite-strings \
$(call cc-option,-fno-stack-protector) $(call cc-option,-Wmissing-prototypes) \
$(_CFLAGS_STACKPROTECTOR) $(_CFLAGS_SANITIZER)
--
2.54.0