Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678Ab3GRHeS (ORCPT ); Thu, 18 Jul 2013 03:34:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56091 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088Ab3GRHeQ (ORCPT ); Thu, 18 Jul 2013 03:34:16 -0400 Date: Thu, 18 Jul 2013 00:34:08 -0700 From: Andrew Morton To: Geert Uytterhoeven Cc: "Yann E. MORIN" , Sam Ravnborg , "H. Peter Anvin" , Ingo Molnar , Kyungsik Lee , Michal Marek , "linux-kernel@vger.kernel.org" , linux-kbuild , "the arch/x86 maintainers" , CE Linux Developers List , "linux-arm-kernel@lists.infradead.org" , hyojun.im@lge.com, chan.jeong@lge.com, Andy Lee , Ingo Molnar , Thomas Gleixner , Russell King , Borislav Petkov , Florian Fainelli , Yann Collet , Chanho Min Subject: Re: [PATCH -next 2/2] kbuild: fix for updated LZ4 tool with the new streaming format Message-Id: <20130718003408.bb9d5b51.akpm@linux-foundation.org> In-Reply-To: References: <1367829775-4434-1-git-send-email-kyungsik.lee@lge.com> <20130716004727.b60b2c96.akpm@linux-foundation.org> <20130716005611.e4ccab02.akpm@linux-foundation.org> <201307161008.07643.yann.morin.1998@free.fr> <20130716180408.GA19863@merkur.ravnborg.org> <20130717211649.GA5619@merkur.ravnborg.org> <20130717223033.GF3385@free.fr> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2160 Lines: 49 On Thu, 18 Jul 2013 09:22:58 +0200 Geert Uytterhoeven wrote: > On Thu, Jul 18, 2013 at 12:30 AM, Yann E. MORIN wrote: > > On 2013-07-17 23:16 +0200, Sam Ravnborg spake thusly: > >> > We could extend the symbol option part to retreive values from a binary. > >> > Something like this: > >> > > >> > config FOOBAR > >> > bool > >> > option exec="true" > >> > > >> > FOOBAR would assume the value "y" if the command true has exit code == 0, otherwise "n". > >> > And similar conversions for other types. > >> > > >> > This only extendt Kconfig slightly - using an already present method to import > >> > external values. > >> > > >> > The drawback I see with this approach is that we may execute a lot of small programs > >> > where the value is never used. > >> > >> Following is a quick patch implmenting this idea. > >> You need to run gperf manually to enable this. > >> > >> "gperf -C scripts/kconfig/zconf.gperf > scripts/kconfig/zconf.hash.c" > >> > >> I did not figure out how to use the built-in rules to generate this file :-( > > > > make REGENERATE_PARSERS=y menuconfig > > > >> I have tested this lightly - as we should discuss if this is a viable way forward. > > > > Instead of extending the Kconfig language, I was thinking (as initially > > suggested by Andrew) of generating a Kconfig file before all config > > targets, and source that Kconfig file from $(TOPDIR)/Kconfig. > > I also prefer the generated Kconfig file. > It keeps all these checks in a single place, instead of spreading it over all > Kconfig files. This allows to keep better control over the list of checks, and > notice when it gets out-of-hand. I prefer the "option exec" approach, actually. That way the shell-outs are colocated with the code which uses them and they will only be executed if you've actually selected that subsystem for building (I think?). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/