53ea1d44f0
This was originally several commits that had to be squashed into one because the intermediate states weren't able to build coreboot: - one to remove everything that wasn't our own code, leaving only regex.[ch], toada.c, description.md and Makefile.inc. - one to copy in Linux 5.13's scripts/kconfig and adapt Makefile.inc to make the original Makefile work again. - adapt abuild to use olddefconfig, simplifying matters. - apply patches in util/kconfig/patches. - Some more adaptations to the libpayload build system. The patches are now in util/kconfig/patches/, reverse applying them should lead to a util/kconfig/ tree that contains exactly the Linux version + our own 5 files. Change-Id: Ia0e8fe4e9022b278f34ab113a433ef4d45e5c355 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37152 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
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(+)
|
|
|
|
Index: kconfig/confdata.c
|
|
===================================================================
|
|
--- kconfig.orig/confdata.c
|
|
+++ kconfig/confdata.c
|
|
@@ -439,6 +439,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;
|
|
}
|
|
@@ -521,6 +522,13 @@ load:
|
|
}
|
|
free(line);
|
|
fclose(in);
|
|
+
|
|
+ name = getenv("KCONFIG_STRICT");
|
|
+ if (name && *name && conf_warnings) {
|
|
+ fprintf(stderr, "\nERROR: %d warnings encountered, and warnings are errors.\n\n", conf_warnings);
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
return 0;
|
|
}
|
|
|