[Buildroot] [PATCH 3/3 v2] linux: kconfig needs the toolchain
Yann E. MORIN
yann.morin.1998 at free.fr
Wed Aug 1 21:23:40 UTC 2018
Starting with linux-4.18, the kconfig from the kernel can call
to the compiler to test its capabilities; see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/Kconfig.include
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: Arnout Vandecappelle <arnout at mind.be>
---
Changes v1 -> v2:
- take advantage of the kconfig-package infra (Thomas)
---
linux/linux.mk | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index 14a9e148cf..6fba92fb94 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -66,7 +66,10 @@ LINUX_DEPENDENCIES += host-kmod
# Starting with 4.16, the generated kconfig code is no longer
# shipped with the kernel sources, so we need flex and bison.
-LINUX_KCONFIG_DEPENDENCIES = host-bison host-flex
+# Starting with 4.18, the kconfig in the kernel calls the
+# cross-compiler to check its capabilities. So we need the
+# toolchain before we can call the configurators.
+LINUX_KCONFIG_DEPENDENCIES = host-bison host-flex toolchain
# host tools needed for kernel compression
ifeq ($(BR2_LINUX_KERNEL_LZ4),y)
@@ -514,6 +517,13 @@ endif # BR_BUILDING
$(eval $(kconfig-package))
+# Starting with linux-4.18, the kconfig in the kernel calls
+# the cross-compiler to check its capabilities. So we need
+# the toolchain before we can call our configurators.
+# Also, since we need LINUX_DIR, we must be after the call
+# to kconfig-package, above.
+$(LINUX_DIR)/.config: | toolchain
+
# Support for rebuilding the kernel after the cpio archive has
# been generated.
.PHONY: linux-rebuild-with-initramfs
--
2.14.1
More information about the buildroot
mailing list