Author: stepan
Date: Mon Apr 18 04:07:16 2011
New Revision: 6511
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6511

Log:
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.reina...@coreboot.org>
Acked-by: Stefan Reinauer <stefan.reina...@coreboot.org>

Modified:
   trunk/util/kconfig/confdata.c

Modified: trunk/util/kconfig/confdata.c
==============================================================================
--- trunk/util/kconfig/confdata.c       Sun Apr 17 16:55:21 2011        (r6510)
+++ trunk/util/kconfig/confdata.c       Mon Apr 18 04:07:16 2011        (r6511)
@@ -721,8 +721,15 @@
 
        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:

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to