mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
kbuild: move -fzero-init-padding-bits=all to the top-level Makefile
The -fzero-init-padding-bits=all option is not a warning flag, so defining it in scripts/Makefile.extrawarn is inconsistent. Move it to the top-level Makefile for consistency. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Kees Cook <kees@kernel.org>
This commit is contained in:
parent
9d702bb1d3
commit
c15253494f
2 changed files with 3 additions and 3 deletions
3
Makefile
3
Makefile
|
|
@ -928,6 +928,9 @@ KBUILD_CFLAGS += $(CC_AUTO_VAR_INIT_ZERO_ENABLER)
|
|||
endif
|
||||
endif
|
||||
|
||||
# Explicitly clear padding bits during variable initialization
|
||||
KBUILD_CFLAGS += $(call cc-option,-fzero-init-padding-bits=all)
|
||||
|
||||
# While VLAs have been removed, GCC produces unreachable stack probes
|
||||
# for the randomize_kstack_offset feature. Disable it for all compilers.
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-stack-clash-protection)
|
||||
|
|
|
|||
|
|
@ -82,9 +82,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
|||
# Warn if there is an enum types mismatch
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wenum-conversion)
|
||||
|
||||
# Explicitly clear padding bits during variable initialization
|
||||
KBUILD_CFLAGS += $(call cc-option,-fzero-init-padding-bits=all)
|
||||
|
||||
KBUILD_CFLAGS += -Wextra
|
||||
KBUILD_CFLAGS += -Wunused
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue