mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [RFC PATCH] kbuild: Do not select symbols with unmet dependencies
Date: Wed, 12 Aug 2009 15:00:24 +0100	[thread overview]
Message-ID: <1250085624.20332.48.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <200908121436.58490.arnd@arndb.de>

On Wed, 2009-08-12 at 14:36 +0200, Arnd Bergmann wrote:
> On Wednesday 12 August 2009, Catalin Marinas wrote:
> > The "select" statement in Kconfig files allows the enabling of options
> > even if they have unmet direct dependencies (i.e. "depends on" expands
> > to "no"). Currently, the "depends on" clauses are used in calculating
> > the visibility but they do not affect the reverse dependencies in any
> > way.
> > 
> > The patch introduces additional tracking of the "depends on" statements
> > and does not allow selecting an option if its direct dependencies are
> > not met, also printing a warning.
> > 
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> 
> I guess this will change the behaviour of a number of subsystems,
> likely causing unexpected regressions. I think your change
> makes sense, but we need to be much more careful.

It would indeed cause regressions, that's why I'm only asking for
comments currently.

> Can you extract a list of configuration symbols that are
> impacted by your patch?

I can generate a list with allyesconfig but it looks like it breaks some
common usage in Linux. For example, the VIDEO_* entries in
drivers/media/video/Kconfig under the "Encoders/decoders and other
helper chips" menu automatically inherit a dependency on
!VIDEO_HELPER_CHIPS_AUTO. This option is enabled to allow other config
options to select whatever they need. But it would fail with my patch
because of the direct dependency of the VIDEO_* options on
!VIDEO_HELPER_CHIPS_AUTO.

It needs a bit more thinking here and maybe writing something like:

menu "..." if !VIDEO_HELPER_CHIPS_AUTO

rather than

menu "..."
	depends on !VIDEO_HELPER_CHIPS_AUTO

though the parser (after modifying the zconf.y to handle this) seems to
consider both dependencies at the same level

-- 
Catalin


  reply	other threads:[~2009-08-12 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 11:39 Catalin Marinas
2009-08-12 12:36 ` Arnd Bergmann
2009-08-12 14:00   ` Catalin Marinas [this message]
2009-08-12 15:55     ` Catalin Marinas

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=1250085624.20332.48.camel@pc1117.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=arnd@arndb.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®