Revert "ANDROID: Revert "Enable '-Werror' by default for all kernel builds""
This reverts commit 828bab93de
.
We should enable this again as all arches are now building successfully.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I06034aa2487f039cd10fd3576c2d2416e599c1ac
This commit is contained in:
parent
dcceef08bf
commit
3f66c2a071
1
Makefile
1
Makefile
@ -808,6 +808,7 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
|
||||
|
||||
KBUILD_CFLAGS += $(stackp-flags-y)
|
||||
|
||||
KBUILD_CFLAGS-$(CONFIG_WERROR) += -Werror
|
||||
KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH:"%"=%)
|
||||
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
|
14
init/Kconfig
14
init/Kconfig
@ -137,6 +137,20 @@ config COMPILE_TEST
|
||||
here. If you are a user/distributor, say N here to exclude useless
|
||||
drivers to be distributed.
|
||||
|
||||
config WERROR
|
||||
bool "Compile the kernel with warnings as errors"
|
||||
default y
|
||||
help
|
||||
A kernel build should not cause any compiler warnings, and this
|
||||
enables the '-Werror' flag to enforce that rule by default.
|
||||
|
||||
However, if you have a new (or very old) compiler with odd and
|
||||
unusual warnings, or you have some architecture with problems,
|
||||
you may need to disable this config option in order to
|
||||
successfully build the kernel.
|
||||
|
||||
If in doubt, say Y.
|
||||
|
||||
config UAPI_HEADER_TEST
|
||||
bool "Compile test UAPI headers"
|
||||
depends on HEADERS_INSTALL && CC_CAN_LINK
|
||||
|
Loading…
Reference in New Issue
Block a user