| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | <sect2><title>Command explanations</title><para><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch:</userinput>This patch converts all occurrences of <filename>$(PERL)</filename> to<filename>/usr/bin/perl</filename> in the<filename>malloc/Makefile</filename> file. This is done because Glibc can'tautodetect the location of perl because perl has yet to be installed. Thepatch also replaces all occurrences of <emphasis>root</emphasis> with<emphasis>0</emphasis> in the <filename>login/Makefile</filename> file.This is done because Glibc itself isn't installed yet and thereforeusername to userid resolving isn't working yet, so a <userinput>chown rootfile</userinput> will fail, however it'll work fine if you use the numericIDs.</para><para>Lastly, the patch also fixes a problem that causes statically linkedbinaries to crash that were linked against Glibc-2.2 libraries. This patchis only needed temporarily because we have static programs in <filenameclass="directory">/static/bin</filename> that might be linked against anolder Glibc version (the one from the host distribution). We will installGlibc again at the end of this chapter to remove this patch so you'll havea pristine Glibc as the developers intended it.</para><para><userinput>touch /etc/ld.so.conf:</userinput> One of the final stepsof the Glibc installation is running ldconfig to update the dynamic loadercache. If this file doesn't exist, the installation will abort with an errorthat it can't read the file, so we simply create an empty file (the emptyfile will have Glibc default to using /lib and /usr/lib which is fine).</para><para><userinput>--disable-profile:</userinput> This disables the buildingof libraries with profiling information. This command may be omitted ifyou plan to do profiling.</para><para><userinput>--enable-add-ons:</userinput> This enables the add-on thatwe install with Glibc, linuxthreads</para><para><userinput>--libexecdir=/usr/bin:</userinput> This will cause thept_chown program to be installed in the /usr/bin directory.</para><para><userinput>echo "cross-compiling = no" > configparms:</userinput>We do this because we are only building for our own system. Cross-compilingis used, for instance, to build a package for an Apple Power PC on anIntel system. The reason Glibc thinks we're cross-compiling is that itcan't compile a test program to determine this, so it automatically defaultsto a cross-compiler. Compiling the test program fails because Glibc hasn'tbeen installed yet.</para><para><userinput>exec /static/bin/bash --login:</userinput> This command willstart a new bash shell which will replace the current shell. This is done to get rid of the "I have no name!" message in the command prompt, which was caused by bash's inability to resolve a user ID to a user name (which in turn was caused by the absence of Glibc).</para></sect2>
 |