On 6.8.2013 00:58, Yann E. MORIN wrote: > On 2013-08-05 10:39 +0200, Michal Marek spake thusly: >> Added Yann and the linux-kbuild list to CC. Reproducer: >> >> git checkout 1fe0135 >> make mrproper >> make allmodconfig >> make silentoldconfig >> git checkout aa8032b >> make allmodconfig >> make silentoldconfig >> >> conf_write_autoconf() first calls conf_split_config() to generate the >> include/config/**.h hierarchy, then generates include/config/auto.conf. >> For some reason, conf_split_config() reads include/config/auto.conf, >> which may not exist yet or may be out of date. Yann, can anything break >> if we simply do not read that file from conf_split_config(), like this? >> >> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c >> index c55c227..8c90835 100644 >> --- a/scripts/kconfig/confdata.c >> +++ b/scripts/kconfig/confdata.c >> @@ -829,16 +829,12 @@ next: >> >> static int conf_split_config(void) >> { >> - const char *name; >> char path[PATH_MAX+1]; >> char *s, *d, c; >> struct symbol *sym; >> struct stat sb; >> int res, i, fd; >> >> - name = conf_get_autoconfig_name(); >> - conf_read_simple(name, S_DEF_AUTO); >> - >> if (chdir("include/config")) >> return 1; [...] > > What I understand of the code is that, we're reading auto.conf with > the S_DEF_AUTO flag, which is expected to set the SYMBOL_DEF_AUTO flags > to symbols read from auto.conf. > > This is then used by conf_split_config to detect symbols that have > changed. Ah, _that_ is why it's there. [...] > The two following tests do not invlolve the HOTPLUG_PCI_.* symbols > on purpose, and involve a pristine master c095ba7: > > $ make allmodconfig > $ make silentoldconfig > $ make silentoldconfig > $ make silentoldconfig > > - Without Michal's proposed change, unaffected symbols are not > touched. For example, mtime and ctime for zswap.h are not changed > after the second and third silentoldconfig. > > - With Michal's proposed change, then mtime and ctime for zswap.h are > changed after each silentoldconfig, even though CONFIG_ZSWAP was not > changed. Yes, I only did a simple diff -rq between two generated include/config directories and did not think about mtimes. > One solution would be to read auto.conf *before* we fuzz around symbols, > not after. We should probably read auto.conf just after we read .config. Maybe the safest solution would be to silence the warning if def == S_DEF_AUTO. Because auto.conf is only read by kconfig in conf_split_config(), when it is expected to be out of date. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html