diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-04-25 03:59:21 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-27 21:16:59 +0200 |
commit | 13b026091be0c9d784c768242c308ffa303bf241 (patch) | |
tree | 21472c366534e08d88a2f8cad90e3e841ab718a8 | |
parent | d087dcec84625ac068c3201e15cd8ab8cc85701d (diff) | |
download | barebox-13b026091be0c9d784c768242c308ffa303bf241.tar.gz barebox-13b026091be0c9d784c768242c308ffa303bf241.tar.xz |
kbuild: swap the include order of arch Makefile and auto.conf.cmd
Include
include/config/auto.conf
arch/$(ARCH)/Makefile
include/config/auto.conf.cmd
in this order, which is the same as the current Linux does.
auto.conf.cmd contains the environment variables that were referenced
from Kconfig files. If an environment variable defined in arch Makefile
is referenced from Kconfig files, Kbuild would end up with eternal
synconfig loop.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -445,12 +445,16 @@ PHONY += scripts scripts: scripts_basic $(Q)$(MAKE) $(build)=$(@) +ifeq ($(dot-config),1) +include include/config/auto.conf +endif + # Objects we will link into barebox / subdirs we need to visit common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/ -ifeq ($(dot-config),1) -include include/config/auto.conf +include $(srctree)/arch/$(ARCH)/Makefile +ifeq ($(dot-config),1) # Read in dependencies to all Kconfig* files, make sure to run syncconfig if # changes are detected. This should be included after arch/$(SRCARCH)/Makefile # because some architectures define CROSS_COMPILE there. @@ -476,8 +480,6 @@ $(KCONFIG_CONFIG): $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig endif # $(dot-config) -include $(srctree)/arch/$(ARCH)/Makefile - KBUILD_CFLAGS += -ggdb3 # Force gcc to behave correct even for buggy distributions |