Re: [PATCH 2/2] Enable 'make CONFIG_FOO=y oldconfig'

From: Arnaud Lacombe
Date: Thu Aug 11 2011 - 10:57:25 EST


Hi,

On Thu, Aug 11, 2011 at 7:56 AM, Michal Marek <mmarek@xxxxxxx> wrote:
> On 11.8.2011 13:40, David Woodhouse wrote:
>> On Thu, 2011-08-11 at 13:15 +0200, Andreas Schwab wrote:
>>>> That would be cute, but I'm not sure how to undefine something set on
>>>> the command line:
>>>>
>>>> $ cat > Makefile <<EOF
>>>> undefine BAR
>>>
>>> override undefine BAR
>>
>> Thanks. So we don't really need to change the auto.conf syntax; we could
>> just do:
>>
>> $(foreach var, $(filter CONFIG_%,$(.VARIABLES)), $(eval override undefine $(var)))
>>
>> But still I suspect we might *not* want that for options set on the
>> command line. We *don't* want 'make CONFIG_FOO=y oldconfig bzImage' to
>> say 'you can't enable CONFIG_FOO' and then build the bzImage anyway.
>
> If you do
> $ echo 'CONFIG_FOO=y' >all.config
> $ make allnoconfig bzImage
> then it will also build bzImage even if kconfig wasn't able to set
> CONFIG_FOO=y. IMO printing a warning that CONFIG_FOO could not be set is
> sufficient, as long as CONFIG_FOO is consistently unset.
>
FWIW, this is the broken behavior I have been pointing all along...

If kconfig hard failed on such case, we would not need such Kbuild black-magic.

>From my point of view, if environment override there should be, it
should behave the same as the all.config logic and hard fail when an
override has not been met. Code wise, this would translate as backend
code path being the same.

- Arnaud
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/