[PATCH 3/4] powerpc: Add -Wvla to arch CFLAGS
Michael Ellerman
mpe at ellerman.id.au
Wed Oct 10 16:13:07 AEDT 2018
Upstream has declared that Variable Length Array's (VLAs) are a bad
idea, and eventually -Wvla will be added to the top-level Makefile. We
can go one better and make sure we don't introduce any more by adding
it to the arch Makefile.
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
arch/powerpc/Kbuild | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild
index 1625a06802ca..86b261d6bde5 100644
--- a/arch/powerpc/Kbuild
+++ b/arch/powerpc/Kbuild
@@ -1,4 +1,5 @@
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+subdir-ccflags-y := $(call cc-option, -Wvla)
+subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
obj-y += kernel/
obj-y += mm/
--
2.17.1
More information about the Linuxppc-dev
mailing list