summaryrefslogtreecommitdiff
path: root/util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch')
-rw-r--r--util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch39
1 files changed, 7 insertions, 32 deletions
diff --git a/util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch b/util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch
index 9e50eb39a1..4b1e5bb71e 100644
--- a/util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch
+++ b/util/kconfig/patches/0001-Kconfig-Add-KCONFIG_STRICT-mode.patch
@@ -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;
}
-