glibc-exp.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <sect2>
  2. <title>Command explanations</title>
  3. <para><userinput>patch -Np0 -i ../glibc-2.2.3-nss.diff</userinput>: This
  4. patch is needed to fix a couple of nasty nis bugs in glibc which can
  5. cause problems.</para>
  6. <para><userinput>mknod -m 0666 /dev/null c 1 3:</userinput> Glibc needs a
  7. null device to compile properly. All other devices will be created in the
  8. next section.</para>
  9. <para><userinput>touch /etc/ld.so.conf</userinput> One of the final steps
  10. of the Glibc installation is running ldconfig to update the dynamic loader
  11. cache. If this file doesn't exist, the installation will abort with an error
  12. that it can't read the file, so we simply create an empty file (the empty file
  13. will have Glibc default to using /lib and /usr/lib which is fine
  14. right now).</para>
  15. <para><userinput>sed s/"\$(PERL)"/"\/usr\/bin\/perl"/
  16. ../glibc-2.2.3/malloc/Makefile &gt; tmp~:</userinput> This sed command
  17. searches through <filename>../glibc-2.2.3/malloc/Makefile</filename> and
  18. converts all occurances of <filename>$(PERL)</filename> to
  19. <filename>/usr/bin/perl</filename>. The output is then written to the
  20. file <filename>tmp~</filename>. This is done because Glibc can't
  21. autodetect perl since it's not installed yet at the time when we install
  22. Glibc.</para>
  23. <para><userinput>mv tmp~ ../glibc-2.2.3/malloc/Makefile:</userinput> The file
  24. <filename>tmp~</filename> is now moved back to
  25. <filename>../glibc-2.2.3/malloc/Makefile</filename>. We do this because
  26. when using sed, we can't write straight back to this file so we need to
  27. use a temporary file in between.</para>
  28. <para><userinput>sed "s/root/0" ../glibc-2.2.3/login/Makefile &gt;
  29. tmp~:</userinput> This sed command replaces all occurances of
  30. <filename>root</filename> in
  31. <filename>../glibc-2.2.3/login/Makefile</filename> with 0. This is
  32. because as we don't have glibc on the LFS system yet, usernames can't
  33. be resolved to their user id's. Therefore, we replace the username
  34. root with the id 0. </para>
  35. <para><userinput>mv tmp~ ../glibc-2.2.3/login/Makefile:</userinput> As above,
  36. we are using a temporary file (<filename>tmp~</filename>) to store the
  37. edited Makefile and then copying it back over the original.</para>
  38. <para><userinput>--enable-add-ons:</userinput> This enables the add-on that
  39. we install with Glibc: linuxthreads</para>
  40. <para><userinput>sed s/"cross-compiling = yes"/"cross-compiling = no"/
  41. config.make &gt; config.make~:</userinput> This time, we're replacing
  42. <filename>cross-compiling = yes</filename> with
  43. <filename>cross-compiling = no</filename>. We do this because we are
  44. only building for our own system. Cross-compiling is used, for
  45. instance, to build a package for an Apple Power PC on an Intel system.
  46. The reason Glibc thinks we're cross-compiling is that it can't compile a
  47. test program to determine this, so it automatically defaults to a
  48. cross-compiler. The reason for the failed program is because Glibc
  49. hasn't been installed yet.</para>
  50. <para><userinput>mv config.make~ config.make:</userinput> Again, we are moving
  51. the temporary file over the original.</para>
  52. </sect2>