Re: [PATCH] Permanently fix kernel configuration include mess (was: Missing #include <config.h>)

Russell King
2005-09-14T08:48:42Z

On Wed, Sep 14, 2005 at 01:39:44AM -0700, Andrew Morton wrote:
> Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> >
> > LINUXINCLUDE := -Iinclude \
> > - $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
> > + $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
> > + -imacros include/linux/autoconf.h
>
> This means that over time the kernel will fail to compile correctly without
> `-imacros include/linux/autoconf.h'.
>
> That's OK for the kernel, but not for out-of-tree stuff. Those drivers
> will need to add the new gcc commandline option too.
>
> Not that I'm saying it's a terrible thing. It's just a thing.

Well I don't really understand all the kbuild complexities, so I just
did a "what works for me in the setups I have" patch. Maybe someone
who properly understands the kbuild complexity should have a look.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core