summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-18 15:41:05 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-18 15:41:05 -0800
commit230b548c15d50068f993948ef4d803f5cc033454 (patch)
treee4919cc6f2ab5b312c3582ad76b5ca7497b7f7ba /scripts
parent1309d4e68497184d2fd87e892ddf14076c2bda98 (diff)
parentfa2144ba9a31d1d0dc9607508576c3850e0d95b1 (diff)
downloadkernel-common-230b548c15d50068f993948ef4d803f5cc033454.tar.gz
kernel-common-230b548c15d50068f993948ef4d803f5cc033454.tar.bz2
kernel-common-230b548c15d50068f993948ef4d803f5cc033454.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED kbuild: fix building vmlinux.o kbuild: allow -fstack-protector to take effect kconfig: fix select in combination with default
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/symbol.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 3929e5b35e79..4a03191ad176 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -298,22 +298,30 @@ void sym_calc_value(struct symbol *sym)
if (sym_is_choice_value(sym) && sym->visible == yes) {
prop = sym_get_choice_prop(sym);
newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
- } else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) {
- sym->flags |= SYMBOL_WRITE;
- if (sym_has_value(sym))
- newval.tri = sym->def[S_DEF_USER].tri;
- else if (!sym_is_choice(sym)) {
- prop = sym_get_default_prop(sym);
- if (prop)
- newval.tri = expr_calc_value(prop->expr);
+ } else {
+ if (sym->visible != no) {
+ /* if the symbol is visible use the user value
+ * if available, otherwise try the default value
+ */
+ sym->flags |= SYMBOL_WRITE;
+ if (sym_has_value(sym)) {
+ newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri,
+ sym->visible);
+ goto calc_newval;
+ }
}
- newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri);
- } else if (!sym_is_choice(sym)) {
- prop = sym_get_default_prop(sym);
- if (prop) {
+ if (sym->rev_dep.tri != no)
sym->flags |= SYMBOL_WRITE;
- newval.tri = expr_calc_value(prop->expr);
+ if (!sym_is_choice(sym)) {
+ prop = sym_get_default_prop(sym);
+ if (prop) {
+ sym->flags |= SYMBOL_WRITE;
+ newval.tri = EXPR_AND(expr_calc_value(prop->expr),
+ prop->visible.tri);
+ }
}
+ calc_newval:
+ newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
}
if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
newval.tri = yes;