%general-entities; ]> Glibc-&glibc-version; Headers Glibc cross tools, headers Installation of Glibc Headers Glibc's configure script checks the version of GCC, and will fail if it's less than 3.4. The next Glibc build will use the GCC that will be installed into /cross-tools in the next step. However, in this step only the Glibc headers are being installed - no compiling is taking place - so the GCC version isn't important. The following sed removes the dependency of GCC 3.4.x: cp -v configure{,.orig} sed -e 's/3.4/3.[0-9]/g' configure.orig > configure echo "libc_cv_forced_unwind=yes" > config.cache echo "libc_cv_c_cleanup=yes" >> config.cache echo "libc_cv_mlong_double_128=yes" >> config.cache echo "libc_cv_alpha_tls=yes" >> config.cache echo "libc_cv_gnu89_inline=yes" >> config.cache CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \ --host=${CLFS_TARGET} --build=${CLFS_HOST} \ --disable-sanity-checks --enable-kernel=2.6.0 \ --with-headers=/tools/include --cache-file=config.cache \ --with-binutils=/cross-tools/${CLFS_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. --prefix=/tools This tells the configure script to prepare to install the package in the /tools directory. --build=${CLFS_HOST} When used with --host, this creates a cross-architecture executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}. --host=${CLFS_TARGET} When used with --build, this creates a cross-architecture executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_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/${CLFS_TARGET}/bin This tells Glibc to use the Binutils for our specific target architecture. Now, install the headers: make install-headers Some files aren't installed by the above command, so we will copy the additional header files we need. First we will copy a common file over to /tools/include: install -dv /tools/include/bits cp -v bits/stdio_lim.h /tools/include/bits Now we will create a blank stub file: touch /tools/include/gnu/stubs.h Another header is needed for NPTL: cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h \ /tools/include/bits/ <para>Details on this package are located in <xref linkend="contents-glibc" role="."/></para> </sect2> </sect1>