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>
This commit is contained in:
@@ -1,43 +1,18 @@
|
||||
From c822f47921feb53b97f48f3aa8d1e843f5099c63 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||
Date: Fri, 17 Jul 2015 17:26:48 -0700
|
||||
Subject: [PATCH] Kconfig: Add KCONFIG_STRICT mode
|
||||
|
||||
This is basically a -Werror mode for Kconfig. When exporting
|
||||
KCONFIG_STRICT in the Makefile, warnings in Kconfig will produce
|
||||
errors instead.
|
||||
|
||||
This will make it easier to spot unclean Kconfig files, settings
|
||||
and dependencies.
|
||||
|
||||
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||
---
|
||||
util/kconfig/confdata.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
Make KCONFIG_WERROR more verbose.
|
||||
|
||||
Index: kconfig/confdata.c
|
||||
===================================================================
|
||||
--- kconfig.orig/confdata.c
|
||||
+++ kconfig/confdata.c
|
||||
@@ -437,6 +437,7 @@ load:
|
||||
if (def == S_DEF_USER) {
|
||||
sym = sym_find(line + 2 + strlen(CONFIG_));
|
||||
if (!sym) {
|
||||
+ conf_warning("trying to assign non-existent symbol %s", line + strlen(CONFIG_));
|
||||
conf_set_changed(true);
|
||||
continue;
|
||||
}
|
||||
@@ -519,6 +520,13 @@ load:
|
||||
}
|
||||
@@ -533,8 +533,10 @@ load:
|
||||
free(line);
|
||||
fclose(in);
|
||||
+
|
||||
+ name = getenv("KCONFIG_STRICT");
|
||||
+ if (name && *name && conf_warnings) {
|
||||
|
||||
- if (conf_warnings && werror)
|
||||
+ if (conf_warnings && werror) {
|
||||
+ fprintf(stderr, "\nERROR: %d warnings encountered, and warnings are errors.\n\n", conf_warnings);
|
||||
+ return 1;
|
||||
exit(1);
|
||||
+ }
|
||||
+
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user