mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: barebox@lists.infradead.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 3/6] kbuild: swap the include order of arch Makefile and auto.conf.cmd
Date: Sat, 25 Apr 2020 03:59:21 +0900	[thread overview]
Message-ID: <20200424185924.705754-3-masahiroy@kernel.org> (raw)
In-Reply-To: <20200424185924.705754-1-masahiroy@kernel.org>

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>
---

 Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 797ed214a..e01a7491a 100644
--- a/Makefile
+++ b/Makefile
@@ -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
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-04-24 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 18:59 [PATCH 1/6] kbuild: remove meaningless headers_check from help target Masahiro Yamada
2020-04-24 18:59 ` [PATCH 2/6] modpost: sync mk_elfconfig.c with Linux 5.7-rc2 Masahiro Yamada
2020-04-24 18:59 ` Masahiro Yamada [this message]
2020-04-24 18:59 ` [PATCH 4/6] kbuild: make DEFCONFIG_LIST work Masahiro Yamada
2020-04-24 18:59 ` [PATCH 5/6] kbuild: use $(SRCARCH) to point to the arch directory Masahiro Yamada
2020-04-24 18:59 ` [PATCH 6/6] kbuild: set SRCARCH=arm when ARCH=arm64 Masahiro Yamada
2020-04-27  7:56 ` [PATCH 1/6] kbuild: remove meaningless headers_check from help target Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424185924.705754-3-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox