Re: toplevel Makefile bug and simple fix

paulsch@us.ibm.com
Mon, 8 Nov 1999 12:21:42 -0500


>I don't know if the other glibc-based distributions put the symlinks
>back in. It's possible. I still say that if your /usr/include/linux
>is a dangling symlink, it is a bug in your headers, not a bug in the
>kernel. Obviously many solutions are possible: a correct symlink
>/usr/include/linux, a correct symlink /usr/src/linux, a real directory
>/usr/include/linux, a real directory /usr/src/linux/include (possibly
>without the rest of the source tree)....

Sorry, I still maintain that it's a bug in the Makefiles because the kernel
and the "scripts" it comes with should be able to build in it's own self
contained directory... I don't have a /usr/src/linux directory, so yeah, I
do have dangling symlinks /usr/include/{linux,asm} which prevent it from
building... That's not the point... I'm not going to argue whether
/usr/include/{linux,asm} should be symlinks or real directories.. It's
irrelevent to this simple problem..

split-include.c, which is where the build dies if there is no
/usr/include/linux (be it a symlink, real directory or whatever), should
use the header files for the kernel that it came with.. i.e. It should
get the proper header files from {my_kernel_src_dir}/include/linux... Not
from /usr/include/linux which is a symlink into
/usr/src/linux/include/linux which who knows what kernel version is in
/usr/src/linux...

Say I'm building several kernel source trees and I have them all in
/usr/src... Let's say in /usr/src I have the kernel source dirs
linux-2.0.xx, linux-2.2.xx, and linux-2.3.xx.. First, I don't want to have
to muck with making /usr/src/linux a symlink to /usr/src/linux-x.x.x every
time I go and build a kernel so that split-include.c gets the correct
header files.. Second, I may want to run more than one kernel build at a
time... If I have /usr/src/linux as a symlink to linux-2.0.xx and I'm
building that kernel and the kernel in linux-2.3.xx at the same time,
linux-2.3.xx is going to use the wrong header files for split-include.c..
The rest of the kernel builds this way using -I$(HPATH) the "scripts"
also...

I don't see why it should be a big deal just to add -I$(HPATH) to HOSTCC in
the Makefile...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/