* Kconfig and toolchain dependencies
@ 2012-02-03 21:29 H. Peter Anvin
2012-02-04 18:32 ` Josh Triplett
2012-02-24 22:19 ` Michal Marek
0 siblings, 2 replies; 5+ messages in thread
From: H. Peter Anvin @ 2012-02-03 21:29 UTC (permalink / raw)
To: linux-kbuild@vger.kernel.org; +Cc: Linux Kernel Mailing List, Ingo Molnar
Right now, we don't have a good way to encode toolchain dependencies in
Kconfig. This makes it hard to add optional features which depend on
newer toolchain features.
If we just add them, then it breaks all*config and randconfig on
platforms with the older toolchains unless the user manually adds
exclusion rules. This is bad for testing.
It seems relatively straightforward to do if we were to manifest some
CONFIG_ variables based on the target toolchain, e.g.
CONFIG_GCC=0x040601
... and perhaps do other tests. I suspect we would run the tests less
frequently than what we do right now with the tests embedded in the
Makefile.
Does anyone have a feel for if this would be a good addition, and if so
where it best fits into the chain?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig and toolchain dependencies
2012-02-03 21:29 Kconfig and toolchain dependencies H. Peter Anvin
@ 2012-02-04 18:32 ` Josh Triplett
2012-02-07 20:26 ` H. Peter Anvin
2012-02-24 22:19 ` Michal Marek
1 sibling, 1 reply; 5+ messages in thread
From: Josh Triplett @ 2012-02-04 18:32 UTC (permalink / raw)
To: H. Peter Anvin
Cc: linux-kbuild@vger.kernel.org, Linux Kernel Mailing List,
Ingo Molnar
On Fri, Feb 03, 2012 at 01:29:09PM -0800, H. Peter Anvin wrote:
> It seems relatively straightforward to do if we were to manifest some
> CONFIG_ variables based on the target toolchain, e.g.
>
> CONFIG_GCC=0x040601
>
> ... and perhaps do other tests. I suspect we would run the tests less
> frequently than what we do right now with the tests embedded in the
> Makefile.
>
> Does anyone have a feel for if this would be a good addition, and if so
> where it best fits into the chain?
This seems like a *great* idea. Unfortunately, a quick look at the
implementation of kbuild suggests that it doesn't currently implement
numeric comparisons (<, <=, >, >=), only equality (= and !=). Most of
the time, a Kconfig file will want to write "depends GCC >=
some_version".
Looking at scripts/kconfig/expr.c, it doesn't look that hard to add,
though.
- Josh Triplett
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig and toolchain dependencies
2012-02-04 18:32 ` Josh Triplett
@ 2012-02-07 20:26 ` H. Peter Anvin
0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2012-02-07 20:26 UTC (permalink / raw)
To: Josh Triplett
Cc: linux-kbuild@vger.kernel.org, Linux Kernel Mailing List,
Ingo Molnar
On 02/04/2012 10:32 AM, Josh Triplett wrote:
>>
>> Does anyone have a feel for if this would be a good addition, and if so
>> where it best fits into the chain?
>
> This seems like a *great* idea. Unfortunately, a quick look at the
> implementation of kbuild suggests that it doesn't currently implement
> numeric comparisons (<, <=, >, >=), only equality (= and !=). Most of
> the time, a Kconfig file will want to write "depends GCC >=
> some_version".
>
> Looking at scripts/kconfig/expr.c, it doesn't look that hard to add,
> though.
>
Range dependencies are probably useful in their own right, too.
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig and toolchain dependencies
2012-02-03 21:29 Kconfig and toolchain dependencies H. Peter Anvin
2012-02-04 18:32 ` Josh Triplett
@ 2012-02-24 22:19 ` Michal Marek
2012-02-24 22:23 ` H. Peter Anvin
1 sibling, 1 reply; 5+ messages in thread
From: Michal Marek @ 2012-02-24 22:19 UTC (permalink / raw)
To: H. Peter Anvin
Cc: linux-kbuild@vger.kernel.org, Linux Kernel Mailing List,
Ingo Molnar
Dne 3.2.2012 22:29, H. Peter Anvin napsal(a):
> Right now, we don't have a good way to encode toolchain dependencies in
> Kconfig. This makes it hard to add optional features which depend on
> newer toolchain features.
>
> If we just add them, then it breaks all*config and randconfig on
> platforms with the older toolchains unless the user manually adds
> exclusion rules. This is bad for testing.
>
> It seems relatively straightforward to do if we were to manifest some
> CONFIG_ variables based on the target toolchain, e.g.
>
> CONFIG_GCC=0x040601
(sorry for the late reply)
It would be a bit tricky, because the toolchain version depends also on
CONFIG_CROSS_COMPILE. So Kconfig would need to know the semantics of
CONFIG_CROSS_COMPILE and CONFIG_GCC and the dependency of the latter on
the former.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig and toolchain dependencies
2012-02-24 22:19 ` Michal Marek
@ 2012-02-24 22:23 ` H. Peter Anvin
0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2012-02-24 22:23 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild@vger.kernel.org, Linux Kernel Mailing List,
Ingo Molnar
On 02/24/2012 02:19 PM, Michal Marek wrote:
> Dne 3.2.2012 22:29, H. Peter Anvin napsal(a):
>> Right now, we don't have a good way to encode toolchain dependencies in
>> Kconfig. This makes it hard to add optional features which depend on
>> newer toolchain features.
>>
>> If we just add them, then it breaks all*config and randconfig on
>> platforms with the older toolchains unless the user manually adds
>> exclusion rules. This is bad for testing.
>>
>> It seems relatively straightforward to do if we were to manifest some
>> CONFIG_ variables based on the target toolchain, e.g.
>>
>> CONFIG_GCC=0x040601
>
> (sorry for the late reply)
>
> It would be a bit tricky, because the toolchain version depends also on
> CONFIG_CROSS_COMPILE. So Kconfig would need to know the semantics of
> CONFIG_CROSS_COMPILE and CONFIG_GCC and the dependency of the latter on
> the former.
>
> Michal
Either way it would mean having to regenerate the config when the
toolchain changes.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-24 22:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 21:29 Kconfig and toolchain dependencies H. Peter Anvin
2012-02-04 18:32 ` Josh Triplett
2012-02-07 20:26 ` H. Peter Anvin
2012-02-24 22:19 ` Michal Marek
2012-02-24 22:23 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).