[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F869FE6.6060400@suse.cz>
Date: Thu, 12 Apr 2012 11:27:02 +0200
From: Michal Marek <mmarek@...e.cz>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, davem@...emloft.net,
tony@...eyournoodle.com, lacombar@...il.com
Subject: Re: [PATCH 0/5] RFC: strip 15,000 lines from a typical autoconf.h
On 12.4.2012 03:19, Linus Torvalds wrote:
> On Wed, Apr 11, 2012 at 4:58 PM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> I think we can easily drop IS_ENABLED() if it has been causing
>> problems. And it clearly is.
What is really causing problems is that kconfig has no view of the
entire kernel configuration.
>> And I had never even looked at that generated file. It's disgusting.
>> We need to stop doing that. It must be driving compile-times up too -
>> just parsing that monster is RealWork(tm).
You forgot that it also contributes to global warming.
> Oh, but I have a sick and twisted mind. And I'm incredibly smart and
> photogenic too.
>
> Here's an implementation of IS_ENABLED() that works in C. Well,
> "gcc-C". It depends on the optimizer DTRT, but gcc really does seem to
> do it.
>
> Ready? You *will* go blind - blinded by the pure beauty and intellect
> in this thing:
>
> #define IS_DEFINED(x) (__stringify(CONFIG_##x)[0]=='1')
Nice. Maybe we could make it simply
#define IS_DEFINED(x) (__stringify(x)[0]=='1')
so that the users are easily grepable and it is obvious that a config
option is being tested, like in the current implementation. The only
thing we lose is the check if 'x' is really a boolean or tristate
option. But it turns out that even now this does not work in all cases.
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists