kbuild: add -Wvla flag unconditionally
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 9 May 2019 06:45:49 +0000 (15:45 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 18 May 2019 02:49:52 +0000 (11:49 +0900)
This flag is documented in the GCC 4.6 manual, and recognized by
Clang as well. Let's rip off the cc-option switch.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Makefile

index 28965187c528487f7634deab949ade738657eb36..a99c7a1836b506f40f9acee838a9949599c955ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -841,7 +841,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 KBUILD_CFLAGS += -Wdeclaration-after-statement
 
 # Variable Length Arrays (VLAs) should not be used anywhere in the kernel
-KBUILD_CFLAGS += $(call cc-option,-Wvla)
+KBUILD_CFLAGS += -Wvla
 
 # disable pointer signed / unsigned warnings in gcc 4.0
 KBUILD_CFLAGS += -Wno-pointer-sign