Re: [patch] Makefile: can't build modules outside the kernel tree if it was built using O=

From: Arnd Bergmann
Date: Fri Sep 18 2009 - 07:15:49 EST


On Thursday 17 September 2009, Caveh Jalali wrote:
> sadly, some 3rd party src packages don't quite do the right thing with
> their kernel include paths and still depend on the include2/asm symlink
> to find the platform header files.
>
> i see your point about include2 being somewhat redundant/legacy, however,
> as long as we are creating it, we should have it point to the intended
> location instead of being a dead link!

I guess we could just as well put something in there to notify such
programs of how to use the kernel Makefiles. External packages should
not try to guess the layout of the kernel source tree, they can only
get it wrong anyway.

There are apparently also user space packages trying to access
/lib/modules/${krel}/build/arch/${arch}/include/, which is even
more wrong.

I'm thinking about adding something in <linux/kernel.h> to warn
about this when using the kernel headers without either '-D__KERNEL__'
or 'make headers_install'. Is there any valid case that this would
break? It should probably give a warning that includes a http URL
holding a description of what to do.

Arnd <><

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