summaryrefslogtreecommitdiff
path: root/util/kconfig/patches
diff options
context:
space:
mode:
Diffstat (limited to 'util/kconfig/patches')
-rw-r--r--util/kconfig/patches/0007-kconfig-Allow-KCONFIG_STRICT-outside-of-confdata.c.patch22
-rw-r--r--util/kconfig/patches/0008-kconfig-Add-wildcard-support-for-source.patch8
2 files changed, 15 insertions, 15 deletions
diff --git a/util/kconfig/patches/0007-kconfig-Allow-KCONFIG_STRICT-outside-of-confdata.c.patch b/util/kconfig/patches/0007-kconfig-Allow-KCONFIG_STRICT-outside-of-confdata.c.patch
index f98729e85b..a9f3218f35 100644
--- a/util/kconfig/patches/0007-kconfig-Allow-KCONFIG_STRICT-outside-of-confdata.c.patch
+++ b/util/kconfig/patches/0007-kconfig-Allow-KCONFIG_STRICT-outside-of-confdata.c.patch
@@ -26,43 +26,43 @@ Index: kconfig/symbol.c
--- kconfig.orig/symbol.c
+++ 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,12 +320,14 @@ static void sym_warn_unmet_dep(struct sy
+@@ -317,12 +318,14 @@ static void sym_warn_unmet_dep(struct sy
" Selected by [m]:\n");
-
+
fputs(str_get(&gs), stderr);
+ 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)
-@@ -340,8 +343,9 @@ void sym_calc_value(struct symbol *sym)
+@@ -338,8 +341,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) {
-@@ -432,6 +436,9 @@ void sym_calc_value(struct symbol *sym)
+@@ -430,6 +434,9 @@ void sym_calc_value(struct symbol *sym)
;
}
-
+
+ if (sym_warnings && werror)
+ exit(1);
+
diff --git a/util/kconfig/patches/0008-kconfig-Add-wildcard-support-for-source.patch b/util/kconfig/patches/0008-kconfig-Add-wildcard-support-for-source.patch
index b476bc1581..2e6a24f30f 100644
--- a/util/kconfig/patches/0008-kconfig-Add-wildcard-support-for-source.patch
+++ b/util/kconfig/patches/0008-kconfig-Add-wildcard-support-for-source.patch
@@ -28,7 +28,7 @@ Index: kconfig/lexer.l
+++ kconfig/lexer.l
@@ -8,6 +8,7 @@
%{
-
+
#include <assert.h>
+#include <glob.h>
#include <limits.h>
@@ -37,7 +37,7 @@ Index: kconfig/lexer.l
@@ -439,6 +440,32 @@ void zconf_nextfile(const char *name)
current_file = file;
}
-
+
+void zconf_nextfiles(const char *wildcard)
+{
+ glob_t g;
@@ -78,7 +78,7 @@ Index: kconfig/lkc.h
+void zconf_nextfiles(const char *name);
int zconf_lineno(void);
const char *zconf_curname(void);
-
+
Index: kconfig/parser.y
===================================================================
--- kconfig.orig/parser.y
@@ -91,4 +91,4 @@ Index: kconfig/parser.y
+ zconf_nextfiles($2);
free($2);
};
-
+