]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/nolibc: test against -Wwrite-strings
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 25 May 2026 08:27:17 +0000 (10:27 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Tue, 26 May 2026 19:06:26 +0000 (21:06 +0200)
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@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260525-nolibc-write-strings-v2-3-ab5cc16c7b23@weissschuh.net
tools/testing/selftests/nolibc/Makefile.include

index 96fe2bc2191eb605f337817f68f5510e6d78e696..c30ca3a9ef142897dbd7fd2d2789851b66b36c06 100644 (file)
@@ -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)