public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Improve dependency checks in kconfig
@ 2008-12-27  9:03 Sam Ravnborg
  2008-12-27  9:24 ` [PATCH 1/4] kconfig: explain symbol value defaults Sam Ravnborg
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sam Ravnborg @ 2008-12-27  9:03 UTC (permalink / raw)
  To: linux-kbuild, LKML, Roman Zippel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-12-27 20:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27  9:03 Improve dependency checks in kconfig Sam Ravnborg
2008-12-27  9:24 ` [PATCH 1/4] kconfig: explain symbol value defaults Sam Ravnborg
2008-12-27  9:24 ` [PATCH 2/4] kconfig: add comments to symbol flags Sam Ravnborg
2008-12-27  9:24 ` [PATCH 3/4] kconfig: struct property commented Sam Ravnborg
2008-12-27  9:24 ` [PATCH 4/4] kconfig: improve readout when we hit recursive dependencies Sam Ravnborg
2008-12-27 20:57 ` Improve dependency checks in kconfig Sam Ravnborg
2008-12-27 20:58 ` [PATCH 1/2] kconfig: print all locations when we see a recursive dependency Sam Ravnborg
2008-12-27 20:58 ` [PATCH 2/2] kconfig: improve error messages for bad source statements Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox