Re: kconfig: report select on a depending option

From: Michal Marek
Date: Thu Mar 18 2010 - 06:12:27 EST


On 18.3.2010 10:21, Jan Engelhardt wrote:
> Hi,
>
>
> With the following combination of Kconfig config options, I can select
> TEST_Z, which will select TEST_X, even if TEST_Y=n. It also allows for
> awkward situations like TEST_Y=M, TEST_X=y, TEST_Z=y, which would yield
> a link time error when X uses Y's symbols.

That's a known bug unfortunatelly
(Documentation/kbuild/kconfig-language.txt):
Note:
select should be used with care. select will force
a symbol to a value without visiting the dependencies.
By abusing select you are able to select a symbol FOO even
if FOO depends on BAR that is not set.
In general use select only for non-visible symbols
(no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.
kconfig should one day warn about such things.



> Is there a way to have such potential errors reported with kconfig?

No there isn't. There is a guy who wants to work on improving/rewriting
the kconfig depsolver during GSoC, let's see :). But a warning should be
easy to add now, I think.

Michal
--
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/