linux-stable/scripts/kconfig
Masahiro Yamada 2a86f66121 kbuild: use KBUILD_DEFCONFIG as the fallback for DEFCONFIG_LIST
Most of the Kconfig commands (except defconfig and all*config) read
the .config file as a base set of CONFIG options.

When it does not exist, the files in DEFCONFIG_LIST are searched in
this order and loaded if found.

I do not see much sense in the last two lines in DEFCONFIG_LIST.

[1] ARCH_DEFCONFIG

The entry for DEFCONFIG_LIST is guarded by 'depends on !UML'. So, the
ARCH_DEFCONFIG definition in arch/x86/um/Kconfig is meaningless.

arch/{sh,sparc,x86}/Kconfig define ARCH_DEFCONFIG depending on 32 or
64 bit variant symbols. This is a little bit strange; ARCH_DEFCONFIG
should be a fixed string because the base config file is loaded before
the symbol evaluation stage.

Using KBUILD_DEFCONFIG makes more sense because it is fixed before
Kconfig is invoked. Fortunately, arch/{sh,sparc,x86}/Makefile define it
in the same way, and it works as expected. Hence, replace ARCH_DEFCONFIG
with "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)".

[2] arch/$(ARCH)/defconfig

This file path is no longer valid. The defconfig files are always located
in the arch configs/ directories.

  $ find arch -name defconfig | sort
  arch/alpha/configs/defconfig
  arch/arm64/configs/defconfig
  arch/csky/configs/defconfig
  arch/nds32/configs/defconfig
  arch/riscv/configs/defconfig
  arch/s390/configs/defconfig
  arch/unicore32/configs/defconfig

The path arch/*/configs/defconfig is already covered by
"arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)". So, this file path is
not necessary.

I moved the default KBUILD_DEFCONFIG to the top Makefile. Otherwise,
the 7 architectures listed above would end up with endless loop of
syncconfig.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-03 20:49:21 +09:00
..
lxdialog kconfig: remove trailing whitespaces 2019-05-09 22:37:17 +09:00
tests docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
.gitignore kconfig: rename generated .*conf-cfg to *conf-cfg 2019-01-06 10:47:09 +09:00
Makefile kbuild: use KBUILD_DEFCONFIG as the fallback for DEFCONFIG_LIST 2020-03-03 20:49:21 +09:00
conf.c kconfig: Add yes2modconfig and mod2yesconfig targets. 2020-01-07 02:18:45 +09:00
confdata.c kconfig: Invalidate all symbols after changing to y or m. 2020-02-05 13:45:37 +09:00
expr.c kconfig: distinguish between dependencies and visibility in help text 2020-01-07 02:18:45 +09:00
expr.h kconfig: distinguish between dependencies and visibility in help text 2020-01-07 02:18:45 +09:00
gconf-cfg.sh kconfig: do not require pkg-config on make {menu,n}config 2018-09-03 02:13:48 +09:00
gconf.c kconfig: fix an "implicit declaration of function" warning 2020-01-10 02:44:54 +09:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings 2018-12-28 22:22:39 +09:00
images.h kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings 2018-12-28 22:22:39 +09:00
lexer.l kconfig: use snprintf for formatting pathnames 2019-05-14 23:23:25 +09:00
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc.h kconfig: Add yes2modconfig and mod2yesconfig targets. 2020-01-07 02:18:45 +09:00
lkc_proto.h kconfig: Fix spelling of sym_is_changable 2019-07-06 21:58:23 +09:00
mconf-cfg.sh kconfig: be more helpful if pkg-config is missing 2019-11-11 20:10:01 +09:00
mconf.c kconfig: fix an "implicit declaration of function" warning 2020-01-10 02:44:54 +09:00
menu.c kconfig: fix nesting of symbol help text 2020-01-07 02:18:45 +09:00
merge_config.sh merge_config.sh: ignore unwanted grep errors 2019-09-04 23:12:50 +09:00
nconf-cfg.sh kconfig: be more helpful if pkg-config is missing 2019-11-11 20:10:01 +09:00
nconf.c kconfig: fix an "implicit declaration of function" warning 2020-01-10 02:44:54 +09:00
nconf.gui.c kconfig/[mn]conf: handle backspace (^H) key 2019-03-29 22:48:01 +09:00
nconf.h kconfig: convert to SPDX License Identifier 2018-12-28 22:22:28 +09:00
parser.y kconfig: remove sym from struct property 2020-01-07 02:18:44 +09:00
preprocess.c kconfig: add static qualifier to expand_string() 2019-06-09 15:08:18 +09:00
qconf-cfg.sh kconfig: do not require pkg-config on make {menu,n}config 2018-09-03 02:13:48 +09:00
qconf.cc kconfig: Fix spelling of sym_is_changable 2019-07-06 21:58:23 +09:00
qconf.h kconfig: fix 'Save As' menu of xconfig 2019-03-12 02:50:24 +09:00
streamline_config.pl kconfig: localmodconfig: fix indentation for closing brace 2020-01-07 02:18:45 +09:00
symbol.c kconfig: squash prop_alloc() into menu_add_prop() 2020-01-07 02:18:44 +09:00
util.c kconfig: convert to SPDX License Identifier 2018-12-28 22:22:28 +09:00