kconfig: Add updates from linux-4.3 and 4.4

Add updates from the following merges:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/scripts/kconfig?id=605e9710fb5fef0dd2bb49d7b75e46601df62112

and

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/scripts/kconfig?id=152813e6e4bbb5f017e33eba7eb01bbda4b389b8

that apply to crosstool-ng.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit is contained in:
Bryan Hundven 2015-11-11 21:27:24 -08:00
parent 265503461b
commit e40f4ee011
5 changed files with 18 additions and 17 deletions

View File

@ -268,8 +268,7 @@ int conf_read_simple(const char *name, int def)
goto load;
sym_add_change_count(1);
if (!sym_defconfig_list) {
if (modules_sym)
sym_calc_value(modules_sym);
sym_calc_value(modules_sym);
return 1;
}
@ -404,9 +403,7 @@ setsym:
}
free(line);
fclose(in);
if (modules_sym)
sym_calc_value(modules_sym);
sym_calc_value(modules_sym);
return 0;
}

View File

@ -1113,7 +1113,7 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
fn(data, e->left.sym, e->left.sym->name);
else
fn(data, NULL, "<choice>");
fn(data, NULL, e->type == E_LEQ ? ">=" : ">");
fn(data, NULL, e->type == E_GEQ ? ">=" : ">");
fn(data, e->right.sym, e->right.sym->name);
break;
case E_UNEQUAL:

View File

@ -467,8 +467,7 @@ void sym_clear_all_valid(void)
for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID;
sym_add_change_count(1);
if (modules_sym)
sym_calc_value(modules_sym);
sym_calc_value(modules_sym);
}
bool sym_tristate_within_range(struct symbol *sym, tristate val)
@ -1117,6 +1116,8 @@ static void sym_check_print_recursive(struct symbol *last_sym)
if (stack->sym == last_sym)
fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
prop->file->name, prop->lineno);
fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n");
if (stack->expr) {
fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
prop->file->name, prop->lineno,

View File

@ -22,6 +22,7 @@ comment, T_COMMENT, TF_COMMAND
config, T_CONFIG, TF_COMMAND
menuconfig, T_MENUCONFIG, TF_COMMAND
help, T_HELP, TF_COMMAND
---help---, T_HELP, TF_COMMAND
if, T_IF, TF_COMMAND|TF_PARAM
endif, T_ENDIF, TF_COMMAND
depends, T_DEPENDS, TF_COMMAND

View File

@ -66,9 +66,16 @@ static void alloc_string(const char *str, int size)
memcpy(text, str, size);
text[size] = 0;
}
static void warn_ignored_character(char chr)
{
fprintf(stderr,
"%s:%d:warning: ignoring unsupported character '%c'\n",
zconf_curname(), zconf_lineno(), chr);
}
%}
n [A-Za-z0-9_]
n [A-Za-z0-9_-]
%%
int str = 0;
@ -106,7 +113,7 @@ n [A-Za-z0-9_]
zconflval.string = text;
return T_WORD;
}
.
. warn_ignored_character(*yytext);
\n {
BEGIN(INITIAL);
current_file->lineno++;
@ -132,8 +139,7 @@ n [A-Za-z0-9_]
BEGIN(STRING);
}
\n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
--- /* ignore */
({n}|[-/.])+ {
({n}|[/.])+ {
const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
@ -146,11 +152,7 @@ n [A-Za-z0-9_]
#.* /* comment */
\\\n current_file->lineno++;
[[:blank:]]+
. {
fprintf(stderr,
"%s:%d:warning: ignoring unsupported character '%c'\n",
zconf_curname(), zconf_lineno(), *yytext);
}
. warn_ignored_character(*yytext);
<<EOF>> {
BEGIN(INITIAL);
}