From a86fe3537350613c0181ce936884036a9695ceea Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 14 Apr 2014 18:27:10 +0900 Subject: kbuild: move extra gcc checks to scripts/Makefile.extrawarn W=... provides extra gcc checks. Having such code in scripts/Makefile.build results in the same flags being added to KBUILD_CFLAGS multiple times becuase scripts/Makefile.build is invoked every time Kbuild descends into the subdirectories. Since the top Makefile is already too cluttered, this commit moves all of extra gcc check stuff to a new file scripts/Makefile.extrawarn, which is included from the top Makefile. Signed-off-by: Masahiro Yamada CC: Sam Ravnborg Signed-off-by: Michal Marek --- Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 60ccbfe750a2..8cc826a504ec 100644 --- a/Makefile +++ b/Makefile @@ -105,10 +105,6 @@ ifeq ("$(origin O)", "command line") KBUILD_OUTPUT := $(O) endif -ifeq ("$(origin W)", "command line") - export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) -endif - # That's our default target when none is given on the command line PHONY := _all _all: @@ -731,6 +727,8 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y) KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO endif +include $(srctree)/scripts/Makefile.extrawarn + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments KBUILD_CPPFLAGS += $(KCPPFLAGS) KBUILD_AFLAGS += $(KAFLAGS) -- cgit v1.2.3-59-g8ed1b