public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Roman Zippel <zippel@linux-m68k.org>
Subject: Improve dependency checks in kconfig
Date: Sat, 27 Dec 2008 10:03:39 +0100	[thread overview]
Message-ID: <20081227090339.GA6279@uranus.ravnborg.org> (raw)

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

             reply	other threads:[~2008-12-27  9:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-27  9:03 Sam Ravnborg [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081227090339.GA6279@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox