%general-entities; ]> GLIBC-&glibc-version; GLIBC cross tools Installation of GLIBC It should be noted that compiling GLIBC in any way other than the method suggested in this book puts the stability of the system at risk. cp -v timezone/Makefile{,.orig} sed 's/\\$$(pwd)/`pwd`/' timezone/Makefile.orig > timezone/Makefile Add the following to config.cache to disable ssp when building GLIBC: echo "libc_cv_ssp=no" > config.cache BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \ AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \ ../glibc-&glibc-version;/configure --prefix=/tools \ --host=${CLFS_TARGET} --build=${CLFS_HOST} \ --disable-profile --with-tls --enable-kernel=2.6.32 \ --with-__thread --with-binutils=/cross-tools/bin \ --with-headers=/tools/include --enable-obsolete-rpc \ --cache-file=config.cache The meaning of the new configure options: BUILD_CC="gcc" This sets GLIBC to use the current compiler on our system. This is used to create the tools GLIBC uses during its build. CC="${CLFS_TARGET}-gcc" This forces GLIBC to use the GCC compiler that we made for our target architecture. AR="${CLFS_TARGET}-ar" This forces GLIBC to use the ar utility we made for our target architecture. RANLIB="${CLFS_TARGET}-ranlib" This forces GLIBC to use the ranlib utility we made for our target architecture. --disable-profile This builds the libraries without profiling information. Omit this option if profiling on the temporary tools is necessary. --with-tls This tells GLIBC to use Thread Local Storage. --enable-kernel=2.6.32 This tells GLIBC to compile the library with support for 2.6.32 and later Linux kernels. --with-__thread This tells GLIBC to use use the __thread for libc and libpthread builds. --with-binutils=/cross-tools/bin This tells GLIBC to use the Binutils that are specific to our target architecture. --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. --enable-obsolete-rpc This tells GLIBC to install rpc headers that are not installed by default but may be needed by other packages. --cache-file=config.cache This tells GLIBC to utilize a premade cache file. During this stage the following warning might appear:
configure: WARNING: *** These auxiliary programs are missing or *** incompatible versions: msgfmt *** some features will be disabled. *** Check the INSTALL file for required versions.
The missing or incompatible msgfmt program is generally harmless. This msgfmt program is part of the Gettext package which the host distribution should provide. Compile the package: make Install the package: make install
<para>Details on this package are located in <xref linkend="contents-glibc" role="."/></para> </sect2> </sect1>