diff options
author | Patrick Georgi <patrick@coreboot.org> | 2023-11-20 19:49:29 +0100 |
---|---|---|
committer | Patrick Georgi <patrick@coreboot.org> | 2023-11-25 14:51:41 +0000 |
commit | 0eab62b9cfadfd7d77ca4b14212fe1695e0a5dd8 (patch) | |
tree | 61b2bb64f139084a7af351051559756ba595e973 /util/kconfig/symbol.c | |
parent | 47282a90debed401ba0110bff06c0a3f837a20bd (diff) |
util/kconfig: Uprev to Linux 6.6's kconfig
Upstream reimplemented KCONFIG_STRICT, just calling it KCONFIG_WERROR.
Therefore, adapt our build system and documentation. Upstream is less
strict at this time, but there's a proposed patch that got imported.
TEST=`util/abuild/abuild -C` output (config.h and
config.build) remains the same. Also, the failure type fixed in
https://review.coreboot.org/c/coreboot/+/11272 can be detected,
which I tested by manually breaking our Kconfig in a similar way.
Change-Id: I322fb08a2f7308b93cff71a5dd4136f1a998773b
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79259
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'util/kconfig/symbol.c')
-rw-r--r-- | util/kconfig/symbol.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/util/kconfig/symbol.c b/util/kconfig/symbol.c index 6cbbac48a1..a50f13121c 100644 --- a/util/kconfig/symbol.c +++ b/util/kconfig/symbol.c @@ -37,6 +37,7 @@ static struct symbol symbol_empty = { struct symbol *modules_sym; static tristate modules_val; +static int sym_warnings; enum symbol_type sym_get_type(struct symbol *sym) { @@ -319,13 +320,14 @@ static void sym_warn_unmet_dep(struct symbol *sym) " Selected by [m]:\n"); fputs(str_get(&gs), stderr); - kconfig_warnings++; + sym_warnings++; } void sym_calc_value(struct symbol *sym) { struct symbol_value newval, oldval; struct property *prop; + const char *werror; struct expr *e; if (!sym) @@ -341,8 +343,9 @@ void sym_calc_value(struct symbol *sym) sym_calc_value(prop_get_symbol(prop)); } + werror = getenv("KCONFIG_WERROR"); + sym_warnings = 0; sym->flags |= SYMBOL_VALID; - oldval = sym->curr; switch (sym->type) { @@ -433,6 +436,9 @@ void sym_calc_value(struct symbol *sym) ; } + if (sym_warnings && werror) + exit(1); + sym->curr = newval; if (sym_is_choice(sym) && newval.tri == yes) sym->curr.val = sym_calc_choice(sym); |