From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cantor2.suse.de ([195.135.220.15]:39216 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075Ab1HJM7k (ORCPT ); Wed, 10 Aug 2011 08:59:40 -0400 Message-ID: <4E4280BA.9050109@suse.cz> Date: Wed, 10 Aug 2011 14:59:38 +0200 From: Michal Marek MIME-Version: 1.0 Subject: Re: [PATCH 2/2] Enable 'make CONFIG_FOO=y oldconfig' References: <1312067499.22074.59.camel@i7.infradead.org> <1312067670.22074.61.camel@i7.infradead.org> <4E34998D.8060806@zytor.com> <4E4140B3.7090802@suse.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Arnaud Lacombe Cc: "H. Peter Anvin" , David Woodhouse , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org On 9.8.2011 17:26, Arnaud Lacombe wrote: > On Tue, Aug 9, 2011 at 10:14 AM, Michal Marek wrote: >> On 31.7.2011 02:05, Arnaud Lacombe wrote: >>> Because kconfig might not be ran exclusively from a fully controlled >>> and restricted environment ? Not to mention that it is used by other >>> people than the linux kernel folks. >> >> Well, it has always been possible to trick kbuild (not kconfig) into >> accepting CONFIG_* options from environment, because unset kconfig options >> in auto.conf are not seen by make. Of course this is completely fragile, >> because there is no dependency checking and such variables are only seen by >> make and do not appear in autoconf.h. So a patch that teaches kconfig to >> read options from the environment would actually make some (albeit currently >> "illegal") use cases work correctly :). >> > kconfig can already set symbol value from the environment. The only > limitation I can see is that it is not optional and require an > explicit environment variable name. I wasn't talking about the env= syntax, but about make CONFIG_EXT2_FS=m all which makes kbuild visit fs/ext2 even if CONFIG_EXT2_FS is disabled in .config. With no update of the configuration or checking the dependencies. Hm, actually this would be a problem even if kconfig does read the CONFIG_* variables from the environment, because it could result in a mismatch if kconfig determines that the variable cannot be set, but make still sees it in the environment. So we would have to use 'undefine CONFIG_FOO' instead of '# CONFIG_FOO is not set' in include/config/auto.conf, to be able to properly support make CONFIG_FOO=y. Michal