From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: kbuild: fixing the select problem Date: Thu, 06 May 2010 09:17:24 -0400 Message-ID: <1273151844.23208.48.camel@mulgrave.site> References: <1273096160.23208.35.camel@mulgrave.site> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kbuild-owner@vger.kernel.org To: Geert Uytterhoeven Cc: linux-arch@vger.kernel.org, linux-kernel , Sam Ravnborg , linux-kbuild@vger.kernel.org, Randy Dunlap List-Id: linux-arch.vger.kernel.org On Thu, 2010-05-06 at 08:47 +0200, Geert Uytterhoeven wrote: > On Wed, May 5, 2010 at 23:49, James Bottomley > wrote: > > [Sam: I know you don't maintain kbuild anymore, but since you have the > > most experience, if you could find time to comment, I'd be grateful] > > > > The select problem is that the kbuild select directive will turn a > > symbol on without reference to its dependencies. This, in turn, means > > that either selected symbols must select their dependencies, or that > > people using select have to be aware of the selected symbol's dependency > > and build those dependencies into their symbol (leading to duplication > > and the possibility of getting the dependencies out of sync). We use > > select for the scsi transport classes, so we run into this problem in > > SCSI quite a lot. > > > > I think the correct fix is to make a symbol that selects another symbol > > automatically inherit all of the selected symbol's dependencies. > > What if there's a good reason the selected symbol has this dependency? > E.g. it depends on a critical feature not available? Like CONFIG_HAS_IOMEM? I don't quite understand the question. If a selected symbol has a critical dependency which is config'd to N then the build usually breaks ... that's what I'm calling the select problem. I thought CONFIG_HAS_IOMEM was usually selected by the architecture, though. In the new proposal, we wouldn't be able to generate the invalid configuration in the first place. James From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bedivere.hansenpartnership.com ([66.63.167.143]:42891 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758075Ab0EFNR2 (ORCPT ); Thu, 6 May 2010 09:17:28 -0400 Subject: Re: kbuild: fixing the select problem From: James Bottomley In-Reply-To: References: <1273096160.23208.35.camel@mulgrave.site> Content-Type: text/plain; charset="UTF-8" Date: Thu, 06 May 2010 09:17:24 -0400 Message-ID: <1273151844.23208.48.camel@mulgrave.site> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: linux-arch@vger.kernel.org, linux-kernel , Sam Ravnborg , linux-kbuild@vger.kernel.org, Randy Dunlap Message-ID: <20100506131724.130gScaUNOZO6eUaNw2AkP8elVcpgVYnPGhvyRk1Lhc@z> On Thu, 2010-05-06 at 08:47 +0200, Geert Uytterhoeven wrote: > On Wed, May 5, 2010 at 23:49, James Bottomley > wrote: > > [Sam: I know you don't maintain kbuild anymore, but since you have the > > most experience, if you could find time to comment, I'd be grateful] > > > > The select problem is that the kbuild select directive will turn a > > symbol on without reference to its dependencies. This, in turn, means > > that either selected symbols must select their dependencies, or that > > people using select have to be aware of the selected symbol's dependency > > and build those dependencies into their symbol (leading to duplication > > and the possibility of getting the dependencies out of sync). We use > > select for the scsi transport classes, so we run into this problem in > > SCSI quite a lot. > > > > I think the correct fix is to make a symbol that selects another symbol > > automatically inherit all of the selected symbol's dependencies. > > What if there's a good reason the selected symbol has this dependency? > E.g. it depends on a critical feature not available? Like CONFIG_HAS_IOMEM? I don't quite understand the question. If a selected symbol has a critical dependency which is config'd to N then the build usually breaks ... that's what I'm calling the select problem. I thought CONFIG_HAS_IOMEM was usually selected by the architecture, though. In the new proposal, we wouldn't be able to generate the invalid configuration in the first place. James