Make: Enable VLA check for kona kernel
Remove VLA (Variable Length Array) as warning-3 option and enable VLA by default and treat VLA usage as errors. Update gcc-wrapper to ignore upstream VLA warnings. Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org> Change-Id: I85e9959c46b599c59a4a10415cd112222467cfca
This commit is contained in:
parent
1859acb7d3
commit
4b61933127
3 changed files with 28 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -760,6 +760,8 @@ endif
|
|||
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wvla)
|
||||
|
||||
ifdef CONFIG_DEBUG_INFO
|
||||
ifdef CONFIG_DEBUG_INFO_SPLIT
|
||||
KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
|
||||
|
|
|
@ -52,7 +52,6 @@ warning-3 += -Wpointer-arith
|
|||
warning-3 += -Wredundant-decls
|
||||
warning-3 += -Wswitch-default
|
||||
warning-3 += $(call cc-option, -Wpacked-bitfield-compat)
|
||||
warning-3 += $(call cc-option, -Wvla)
|
||||
|
||||
warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
|
||||
warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
|
||||
|
|
|
@ -17,6 +17,32 @@ import subprocess
|
|||
# force LANG to be set to en_US.UTF-8 to get consistent warnings.
|
||||
|
||||
allowed_warnings = set([
|
||||
"seqiv.c:76",
|
||||
"echainiv.c:50",
|
||||
"crypto.c:67",
|
||||
"shash.c:91",
|
||||
"shash.c:127",
|
||||
"smp.c:176",
|
||||
"xcbc.c:68",
|
||||
"hmac.c:56",
|
||||
"cbc.c:14",
|
||||
"cbc.h:116",
|
||||
"cryptd.c:487",
|
||||
"cryptd.c:515",
|
||||
"ablkcipher.c:215",
|
||||
"authenc.c:188",
|
||||
"authenc.c:186",
|
||||
"authencesn.c:186",
|
||||
"libcrc32c.c:45",
|
||||
"ppp_mppe.c:158",
|
||||
"ppp_mppe.c:369",
|
||||
"ppp_mppe.c:483",
|
||||
"dm-verity-fec.c:218",
|
||||
"umid.c:138",
|
||||
"umid.c:213",
|
||||
"umid.c:388",
|
||||
"shash.c:92",
|
||||
"shash.c:128",
|
||||
])
|
||||
|
||||
# Capture the name of the object file, can find it.
|
||||
|
|
Loading…
Reference in a new issue