Improve dependency checks in kconfig
From: Sam Ravnborg
Date: Sat Dec 27 2008 - 04:02:30 EST
While working on some unification of Kconfig stuff across
all architectures I hit a Kconfig bug where it segfaulted
due to a recursive dependency.
It's a bug I have introduced myself long time ago :-(
I decided to do the reporting more verbose while fixing
this bug.
When looking into this I added a few comments to expr.h
so I do not have to fnd out how it works next time.
The problem was that kconfig do not save where it finds
a config symbol but only the related properties.
But a symbol defined like this:
config FOO
bool
does not have any properties so we do not save any
filename/line numbers.
The solution I came up with was to add a new property:
P_SYMBOL used solely to record filename/line number for
defined symbols.
I could not add it to struct symbol because a symbol can
be defined at several places.
With this change kconfig at least report one of the
places where said symbol is defined. It is not perfect as
we should report all places where a symbol is reported but
for the cases I hit what we have here was good enough.
With this I hit a recursive dependency issue in m68k - a patch
is already sent to the m68k guys.
Patches follows.
Sam Ravnborg (4):
kconfig: explain symbol value defaults
kconfig: add comments to symbol flags
kconfig: struct property commented
kconfig: improve readout when we hit recursive dependencies
scripts/kconfig/expr.h | 83 ++++++++++++++++++++++++++++++---------------
scripts/kconfig/menu.c | 2 +
scripts/kconfig/symbol.c | 11 ++++--
3 files changed, 65 insertions(+), 31 deletions(-)
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/