From ac1ffde1ba053db0266f886a15ed845a6628fcb0 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 27 Jul 2010 21:57:43 +0200 Subject: 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: Ulf Magnusson Reviewed-by: WANG Cong Signed-off-by: Michal Marek --- scripts/kconfig/confdata.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 210a49e27d4..8dce5862550 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -170,8 +170,11 @@ int conf_read_simple(const char *name, int def) if (in) goto load; sym_add_change_count(1); - if (!sym_defconfig_list) + if (!sym_defconfig_list) { + if (modules_sym) + sym_calc_value(modules_sym); return 1; + } for_all_defaults(sym_defconfig_list, prop) { if (expr_calc_value(prop->visible.expr) == no || -- cgit v1.2.3-70-g09d2