aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-04-14 05:27:10 -0400
committerMichal Marek <mmarek@suse.cz>2014-04-16 17:28:41 -0400
commita86fe3537350613c0181ce936884036a9695ceea (patch)
tree7572e2131dc2c9e014c4c22302336c5812912393 /Makefile
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
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 <yamada.m@jp.panasonic.com> CC: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 2 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 60ccbfe750a2..8cc826a504ec 100644
--- a/Makefile
+++ b/Makefile
@@ -105,10 +105,6 @@ ifeq ("$(origin O)", "command line")
105 KBUILD_OUTPUT := $(O) 105 KBUILD_OUTPUT := $(O)
106endif 106endif
107 107
108ifeq ("$(origin W)", "command line")
109 export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
110endif
111
112# That's our default target when none is given on the command line 108# That's our default target when none is given on the command line
113PHONY := _all 109PHONY := _all
114_all: 110_all:
@@ -731,6 +727,8 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
731 KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO 727 KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
732endif 728endif
733 729
730include $(srctree)/scripts/Makefile.extrawarn
731
734# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments 732# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
735KBUILD_CPPFLAGS += $(KCPPFLAGS) 733KBUILD_CPPFLAGS += $(KCPPFLAGS)
736KBUILD_AFLAGS += $(KAFLAGS) 734KBUILD_AFLAGS += $(KAFLAGS)