Re: Where's the documentation for Kconfig?

From: Roman Zippel (zippel@linux-m68k.org)
Date: Sat Nov 02 2002 - 14:26:31 EST


Hi,

On Sat, 2 Nov 2002, Erik Andersen wrote:

> On Thu Oct 31, 2002 at 03:43:26PM +0100, Roman Zippel wrote:
> > kconfig:
> > config /symbol/
> > bool /prompt/
> > default /word/
>
> Suppose at some time we wished to move things like architecture
> specific CFLAGS into Kconfig. It would be implemented as a
> "string" object and would look something like:
>
> config CPU_CFLAGS
> string
> default "-march=i386" if M386
> default "-march=i486" if M486
> default "-march=i586" if M586
> default "-march=i686 -malign-functions=4" if MK7

It's possible, but I don't think we will start in the arch part. More
interesting would be driver entries like:

driver foo
        tristate "foo support"
        depends on BAR
        source foo.c

part of this could also be:

        cflags "..." [if ...]

> So for the K7 case, we could expand it to something much more
> sneaky later on, something like:
> default "$(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)" if MK7
> and the check_gcc macro could be correctly evaluated by make.
> Neat stuff. (Such a check_gcc macro does not yet exist in the
> kernel Makefiles, but surely will sometime).

Having make specific macros in the configuration is not really a good
idea. Such tests should rather be done by a shell script and its output
would be imported into the build system.

bye, Roman

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



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:26 EST