On Die, 2002-10-22 at 02:43, Malte Cornils wrote: 
> On Mon, Oct 21, 2002 at 08:08:20PM +0200, Benjamin Herrenschmidt wrote:
> > >[using /usr/include/linux etc symlinks]
> > >Worked for ages.
> > 
> > Well, maybe, but it has always been the wrong thing to do,
> > at least according to Linus, and this have been more of
> > a problem with recent kernels. Some reasons are userland
> > abuse of inline function declared in kernel headers, others
> > are possibly type pollution, and finally, the simple fact
> > that your glibc headers aren't just supposed to work with
> > different kernel headers than the ones this glibc was
> > built with (oh well....)
> 
> That's what I thought too. Is there any reason, then, that the install
> script for the binary dri module releases tries to use
> /usr/include/linux/... stuff per default?

I agree that's a bad thing. :)

> How do I even tell the script where to look for the include files of the running 
>kernel for the drm module
> build process? 
> 
> For example, I built my current kernel on
> /home/mcornils/kernel-source-2.4.18, my /usr/src/linux still points to the
> kernel used to compile my distro's libc, how do I communicate this to the
> build script? A TREE environment variable didn't work. 

The gotcha about TREE is that you have to provide the include directory, so
you'd have to use TREE=/home/mcornils/kernel-source-2.4.18/include in this case.


> > If you need access to real up-to-date kernel headers,
> > you'd rather go look at the symlink in
> > /lib/modules/kernel_version/build if it exist, or ask
> > the user (eventually fallback to /usr/src/linux).
> 
> Maybe this strategy could be used in the build scripts, too?

Already is, from Makefile.linux:

A := /lib/modules/$(VERSION)/build/include
B := /usr/src/linux-$(VERSION)/include
C := /usr/src/linux/include
D := /usr/include

If TREE isn't specified by the user, these are tried in this order. IMHO
only the first one is sensible, but I definitely vote for removing the
last one as only broken systems will have kernel headers in
/usr/include, on sane systems compilation will be attempted and fail.


-- 
Earthling Michel D�nzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast



-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future of
Java(TM) technology. Join the Java Community Process(SM) (JCP(SM))
program now. http://ad.doubleclick.net/clk;4699841;7576301;v?
http://www.sun.com/javavote
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to