Emit unwritten symbols in Kconfig so we don't have to do constructs like

#if defined(CONFIG_FOO) && CONFIG_FOO anymore. This was partially implemented 
but didn't work for symbols that were unset because of a missing dependency.

Patch taken from SeaBIOS.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6511 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2011-04-18 02:07:16 +00:00 committed by Stefan Reinauer
parent ee4c6f7c80
commit ebc93def5b
1 changed files with 8 additions and 1 deletions

View File

@ -721,8 +721,15 @@ int conf_write_autoconf(void)
for_all_symbols(i, sym) { for_all_symbols(i, sym) {
sym_calc_value(sym); sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE) || !sym->name) if (!sym->name)
continue; continue;
if (!(sym->flags & SYMBOL_WRITE)) {
if (sym->type == S_BOOLEAN || sym->type == S_HEX
|| sym->type == S_INT)
fprintf(out_h, "#define CONFIG_%s 0\n",
sym->name);
continue;
}
switch (sym->type) { switch (sym->type) {
case S_BOOLEAN: case S_BOOLEAN:
case S_TRISTATE: case S_TRISTATE: