summaryrefslogtreecommitdiff
path: root/util/kconfig/confdata.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2011-04-18 02:07:16 +0000
committerStefan Reinauer <stepan@openbios.org>2011-04-18 02:07:16 +0000
commitebc93def5be132006c373d883c4b1b498b262a21 (patch)
tree18e76ad191fa44266a9db44cb480dfaff43dfeb7 /util/kconfig/confdata.c
parentee4c6f7c8028f9854442c08b61aa3436dca5ab36 (diff)
downloadcoreboot-ebc93def5be132006c373d883c4b1b498b262a21.tar.xz
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
Diffstat (limited to 'util/kconfig/confdata.c')
-rw-r--r--util/kconfig/confdata.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c
index 3bbad3010a..946b8a9c0b 100644
--- a/util/kconfig/confdata.c
+++ b/util/kconfig/confdata.c
@@ -721,8 +721,15 @@ int conf_write_autoconf(void)
for_all_symbols(i, sym) {
sym_calc_value(sym);
- if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
+ if (!sym->name)
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) {
case S_BOOLEAN:
case S_TRISTATE: