summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-04-10 23:31:58 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2021-04-14 15:22:49 +0900
commitf02aa48dde8b96eef5998b049ad11547bfc16080 (patch)
tree5baa115d29cee0277dfe5953e8758c0653d4d7fa /scripts
parent5ee546594025fc9337e4cc8b79db89f1258cf480 (diff)
downloadlwn-f02aa48dde8b96eef5998b049ad11547bfc16080.tar.gz
lwn-f02aa48dde8b96eef5998b049ad11547bfc16080.zip
kconfig: use /boot/config-* etc. as DEFCONFIG_LIST only for native build
When the .config file is missing, 'make config', 'make menuconfig', etc. uses a file listed in DEFCONFIG_LIST, if found, as base configuration. Ususally, /boot/config-$(uname -r) exists, and is used as default. However, when you are cross-compiling the kernel, it does not make sense to use /boot/config-* on the build host. It should default to arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). UML previously did not use DEFCONFIG_LIST at all, but it should be able to use arch/um/configs/$(KBUILD_DEFCONFIG) as a base config file. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 46f2465177f0..1d1a7f83ee8d 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -18,14 +18,14 @@ silent := -s
endif
export KCONFIG_DEFCONFIG_LIST :=
-ifneq ($(SRCARCH),um)
+ifndef cross_compiling
kernel-release := $(shell uname -r)
-KCONFIG_DEFCONFIG_LIST := \
+KCONFIG_DEFCONFIG_LIST += \
/lib/modules/$(kernel-release)/.config \
/etc/kernel-config \
- /boot/config-$(kernel-release) \
- arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)
+ /boot/config-$(kernel-release)
endif
+KCONFIG_DEFCONFIG_LIST += arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)
# We need this, in case the user has it in its environment
unexport CONFIG_