|
发表于 2003-12-27 16:26:30
|
显示全部楼层
最初由 ftyh 发表
Chapter 6 -- Installing sanitized kernel headers
------------------------------------------------
Right after installing Glibc, untar the glibc-kernheaders tarball
and cd to the extracted usr/include directory.
cp -R asm-i386 /usr/include/asm
cp -R linux /usr/include
在nptl的hiting里面曾经有这一步,你应该也是按照这里面的提示所做的,如果你也有做的话,那么就是用了2.4的内核 头文件了。还有就是在编译glibc的时候,所用的那个glibc-kernheaders-2.4-8.41.tar.bz2
也是2.4的内核头文件。glibc现在还是要用到2.4内核头文件才能通过的。
Chapter 6 -- Installing 2.6 kernel headers
------------------------------------------
It is agreed that user space shouldn't use kernel headers, but use a
set of sanitized headers such as distributions use instead. Glibc is an
exception to this rule, and it needs to be built against the most
recent headers to make use of new kernel features. So we'll install
them to a prefix other than /usr/include and instruct Glibc to look
for them there.
make mrproper &&
make include/linux/version.h &&
make include/asm &&
mkdir /usr/src/glibcheaders &&
cp -HR include/asm /usr/src/glibcheaders &&
cp -R include/asm-generic /usr/src/glibcheaders &&
cp -R include/linux /usr/src/glibcheaders &&
touch /usr/src/glibcheaders/linux/autoconf.h
这个就是安装2.4内核头文件。在编译glibc之间做的。
根据说明,这个是安装2.6内核头文件,安装到/usr/src/glibcheaders,专门供编译glibc使用的;所以glibc是可以使用2.6头文件编译通过的
而安装在默认路径/usr/include下面的才是2.4的内核,是供除了glibc之外的应用程序使用的,当然glibc也可以用这个2.4的headers,除非编译时使用了--with-kernel-header=/usr/src/glibcheaders |
|