kconfig: recalc symbol value before showing search results
A symbol's value won't be recalc-ed until we save config file or
enter the menu where the symbol sits.
So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:
Symbol: FUNCTION_GRAPH_TRACER [=y]
Prompt: Kernel Function Graph Tracer
Defined at kernel/trace/Kconfig:140
Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
...
From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
but it still shows FUNCTION_GRAPH_TRACER=y.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 9ee3923..2e7a048 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -755,6 +755,7 @@
return NULL;
}
}
+ sym_calc_value(sym);
sym_arr[cnt++] = sym;
}
if (sym_arr)