提交 ac1ffde1 编写于 作者: U Ulf Magnusson 提交者: Michal Marek

kconfig: fix MODULES-related bug in case of no .config

There seems to be a kconfig bug due to MODULES not always being
evaluated if no .config is found. Take the following Kconfig as an
example:

config MODULES
	def_bool y

config FOO
	def_tristate m

With no .config, the following configuration is generated:

CONFIG_MODULES=y
CONFIG_FOO=y

With an empty .config, the following:

CONFIG_MODULES=y
CONFIG_FOO=m

Tristate choice statements can also exhibit the problem, due to having an
implicit rev_dep (select) containing "m".

The problem is that MODULES is never evaluted in conf_read_simple() unless
there's a .config. The following patch fixes this.
Signed-off-by: NUlf Magnusson <ulfalizer.lkml@gmail.com>
Reviewed-by: NWANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 1244b41d
...@@ -170,8 +170,11 @@ int conf_read_simple(const char *name, int def) ...@@ -170,8 +170,11 @@ int conf_read_simple(const char *name, int def)
if (in) if (in)
goto load; goto load;
sym_add_change_count(1); sym_add_change_count(1);
if (!sym_defconfig_list) if (!sym_defconfig_list) {
if (modules_sym)
sym_calc_value(modules_sym);
return 1; return 1;
}
for_all_defaults(sym_defconfig_list, prop) { for_all_defaults(sym_defconfig_list, prop) {
if (expr_calc_value(prop->visible.expr) == no || if (expr_calc_value(prop->visible.expr) == no ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册