Re: [PATCH] use correct include dir for build tools

From: Mike Castle (
Date: Thu Feb 22 2001 - 18:09:46 EST

On Thu, Feb 22, 2001 at 02:40:55PM -0800, Robert Read wrote:
> Ok, my bad, I forgot about cross-compiles. The problem was
> scripts/split-include.c includes errno.h, which requires linux/errno.h
> to exist, and I thought it would be better to use the current kernel's
> version, rather than the system version. I guess not.

Oh no. Definitely not.

Linus went on a tirade not too long ago about that. You can search the
kernel archives for the details and long heated threads. But it comes down
to this:

For user space compiling, the kernel include files should be those that
libc was built against.

For kernel space compiling, the kernel include files should be those that
the components will link against (static or modules).

So, theoretically, a package that has both components should take care to
do the proper includes. But that's it.

(libc does usually take care to be able to build against a later kernel
version than you're running on, and determine at run time what features may
or may not be there, so one could have a 2.4.2 kernel handy to build libc
against while still running a 2.2.18 kernel. Theoretically.)


       Mike Castle       Life is like a clock:  You can work constantly  and be right all the time, or not work at all and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:29 EST