mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> CC: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
This commit is contained in:
parent
c9eaa447e7
commit
a86fe35373
3 changed files with 69 additions and 65 deletions
6
Makefile
6
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue