Re: [question] pass CONFIG_FOO to CC problem

From: Coywolf Qi Hunt
Date: Wed Jun 22 2005 - 21:22:15 EST

On Wed, Jun 22, 2005 at 08:12:07PM +0200, DervishD wrote:
> Hi Coywolf :)
> * Coywolf Qi Hunt <coywolf@xxxxxxxxx> dixit:
> > I was expecting kbuild passes CONFIG_FOO from .config to CC
> > -DCONFIG_FOO, but it doesn't. So I have to add
> >
> > ifdef CONFIG_FOO
> > endif
> NO! You don't do it that way in the kernel. Think: if you have to
> pass a '-D' option for each config item you set, you will end up with
> TONS of '-D' options, in fact you probably exceed the command line
> size limit.

I see. It's not only ugly, but also harmful.

> You have to include <linux/config.h> if I recall correctly ;)

<linux/config.h> is for this purpose, if I understand correctly.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at