[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACqU3MWsHKnEwstzc-QQNXZZfFKR31RP0sdQmHmhgvdfrWXP-Q@mail.gmail.com>
Date: Mon, 15 Aug 2011 10:52:31 -0400
From: Arnaud Lacombe <lacombar@...il.com>
To: Michal Marek <mmarek@...e.cz>
Cc: Rabin Vincent <rabin@....in>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: IS_ENABLED() and non-available symbols
Hi,
2011/8/15 Michal Marek <mmarek@...e.cz>:
> On 14.8.2011 19:02, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Sun, Aug 14, 2011 at 12:55 PM, Arnaud Lacombe <lacombar@...il.com> wrote:
>>> The solution is trivial, but I am not sure we want to go that way: we
>>> need to generated a __enabled_ entry for symbols for _all_ symbols in
>>> the configuration, even internal one
>>>
>> That should do the job...
>>
>> -= NOT FOR MERGE =-
>>
>> Not-Signed-off-by: Arnaud Lacombe <lacombar@...il.com>
>>
>> ---
>> scripts/kconfig/confdata.c | 42 +++++++++++++++++++++++++++++++-----------
>> 1 files changed, 31 insertions(+), 11 deletions(-)
>>
>> for_all_symbols(i, sym) {
>> + conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL);
>> +
>> sym_calc_value(sym);
>> if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
>> continue;
>
> I like the approach, it will work even with not visible symbols and
> still catch typos (which #ifdef does not protect against).
>
actually, the print should be after `sym_calc_value(sym)' to get the
value right..
> But with the
> patch as-is, the generated autoconf.h starts with lots of
>
> #define __enabled_CONFIG_(null) 1
> #define __enabled_CONFIG_(null)_MODULE 0
> #define __enabled_CONFIG_(null) 1
> #define __enabled_CONFIG_(null)_MODULE 0
> #define __enabled_CONFIG_(null) 0
>
that should be trivial to fix. Sunday morning patches...
I'd be interested to also know the cost of all those new symbols on
build time...
- Arnaud
--
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