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

Mike Castle (dalgoda@ix.netcom.com)
Thu, 22 Feb 2001 15:09:46 -0800


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.)

mrc

-- 
       Mike Castle       Life is like a clock:  You can work constantly
  dalgoda@ix.netcom.com  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ 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 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/