| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | <sect2><title>Installation of Glibc</title><para>At the beginning of this chapter you installed Glibc and applied apatch to it. Part of this patch was undoing some changes to make staticbinaries compiled against Glibc-2.2 work. However, this is not what theGlibc developers intended and we don't need to keep this modified Glibcaround. So we reinstall Glibc here to remove this patch.</para><para>A second reason to install Glibc again is because it's consideredcleaner. The first Glibc was installed using programs compiled on your hostdistribution which sometimes has the effect of tainting Glibc. While thisisn't a problem with the other packages compiled early in this chapter, forGlibc we want to be sure it's 100% OK (although feel free to reinstallother packages at this point so you can say you compiled an LFS system withLFS. Much like GCC's bootstrap installation method).</para><para>We'll also install the linuxthreads man pages here. As you mayrecall, during the first installation of Glibc this wasn't possible becausePerl wasn't installed yet. Everything we need to install the Glibclinuxthread man pages is present now, so we'll take care of this toonow.</para><para>Before starting to install glibc, you must cd into theglibc-&glibc-version; directory and unpack glibc-linuxthreads insidethe glibc-&glibc-version; directory, not in /usr/src as you normallywould do.</para><para>This package is known to behave badly when you have changed itsdefault optimization flags (including the -march and -mcpu options). Glibcis best left alone. Therefore, if you have defined any environment variablesthat override default optimizations, such as CFLAGS and CXXFLAGS, werecommend unsetting or modifying them when building Glibc. You havebeen warned.</para><para>Basically, compiling Glibc in any other way than the book suggestsis putting your system at very high risk.</para><para>Install Glibc by running the following commands:</para><para><screen><userinput>mkdir ../glibc-build &&cd ../glibc-build &&../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \    --enable-add-ons --libexecdir=/usr/bin &&make &&make install &&make -C ../glibc-&glibc-version;/linuxthreads/man &&make -C ../glibc-&glibc-version;/linuxthreads/man install &&exec /bin/bash --login</userinput></screen></para></sect2>
 |