%general-entities; ]> Glibc-&glibc-version; Headers Glibc cross tools, headers Installation of Glibc Headers The following sed removes a dependency of gcc 3.4.x from the glibc used in cross-lfs. The reason it is changed is because only the headers are being installed now; no compiling takes place. In the next glibc build, the gcc that's built right after this section will be used. cp -v configure{,.orig} sed -e 's/3.4/3.[0-9]/g' configure.orig > configure Glibc has an issue cross-compiling the headers, where it can misdetect the capabilities of Binutils and decide they are inadequate. The following line fixes this: echo "libc_cv_initfini_array=yes" >> config.cache CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \ --host=${LFS_TARGET} --build=${LFS_HOST} \ --disable-sanity-checks --enable-kernel=2.6.0 \ --with-headers=/tools/include --cache-file=config.cache \ --with-binutils=/cross-tools/${LFS_TARGET}/bin Any error message you see about nptl at this point can safely be ignored. The meaning of the configure options: CC=gcc Tells Glibc to use the host's GCC compiler. --build=${LFS_HOST} When used with --host, this creates a cross-architecture executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST). --host=${LFS_TARGET} When used with --build, this creates a cross-architecture executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST). --disable-sanity-checks This switch disables any checks that are in place. --enable-kernel=2.6.0 This tells Glibc to compile the library with support for 2.6.x Linux kernels. --with-headers=/tools/include This tells Glibc to compile itself against the headers recently installed to the /tools directory, so that it knows exactly what features the kernel has and can optimize itself accordingly. --with-binutils=/cross-tools/${LFS_TARGET}/bin This tells Glibc to use the binutils for the specific target architecture. Now, install the headers: make install-headers Some files aren't installed by the above command, so copy the additional header files that are needed: First copy a common file over to /tools/include: install -dv /tools/include/bits cp bits/stdio_lim.h /tools/include/bits Now create a blank stub file: touch /tools/include/gnu/stubs.h For NPTL use the following command: cp -v ../glibc-&glibc-version;/nptl/sysdeps/pthread/pthread.h /tools/include/ Now copy the architecture specific header over: cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h /tools/include/bits/ <para>Details on this package are located in <xref linkend="contents-glibc" role="."/></para> </sect2> </sect1>