glibc-exp.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <sect2>
  2. <title>Command explanations</title>
  3. <para><userinput>mknod -m 0666 /dev/null c 1 3:</userinput> Glibc needs a
  4. null device to compile properly. All other devices will be created in the
  5. next section.</para>
  6. <para><userinput>touch /etc/ld.so.conf</userinput> One of the final steps
  7. of the Glibc installation is running ldconfig to update the dynamic loader
  8. cache. If this file doesn't exist, the installation will abort with an error
  9. that it can't read the file, so we simply create an empty file (the empty file
  10. will have Glibc default to using /lib and /usr/lib which is fine).</para>
  11. <para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
  12. malloc/Makefile.backup &gt; malloc/Makefile:</userinput> This sed command
  13. searches through <filename>malloc/Makefile.backup</filename> and
  14. converts all occurrences of <filename>$(PERL)</filename> to
  15. <filename>/usr/bin/perl</filename>. The output is then written to the
  16. original <filename>malloc/Makefile.in</filename> which is used during
  17. configuration. This is done because Glibc can't autodetect perl since
  18. it hasn't been installed yet.</para>
  19. <para><userinput>sed 's/root/0' login/Makefile.backup &gt;
  20. login/Makefile:</userinput> This sed command replaces all occurences of
  21. <filename>root</filename> in <filename>login/Makefile.backup</filename>
  22. with 0. This is because we don't have glibc on the LFS system yet, so
  23. usernames can't be resolved to their user id's. Therefore, we replace
  24. the username root with user id 0.</para>
  25. <para><userinput>--enable-add-ons:</userinput> This enables the add-on that
  26. we install with Glibc: linuxthreads</para>
  27. <para><userinput>--libexecdir=/usr/bin:</userinput> This will cause the
  28. pt_chown program to be installed in the /usr/bin directory.</para>
  29. <para><userinput>sed 's/cross-compiling = yes/cross-compiling = no/'
  30. config.make.backup &gt; config.make:</userinput> This time, sed searches
  31. through <filename>config.make.backup</filename> and replaces all occurences
  32. of <filename>cross-compiling = yes</filename> with
  33. <filename>cross-compiling = no</filename>. We do this because we are
  34. only building for our own system. Cross-compiling is used, for instance,
  35. to build a package for an Apple Power PC on an Intel system. The reason
  36. Glibc thinks we're cross-compiling is that it can't compile a test program
  37. to determine this, so it automatically defaults to a cross-compiler.
  38. Compiling the test program failes because Glibc hasn't been installed
  39. yet.</para>
  40. <para><userinput>exec /bin/bash:</userinput>This command will
  41. start a new bash shell which will replace the current shell. This is
  42. done to get rid of the "I have no name!" message in the command
  43. prompt, which was caused by bash's inability to resolve a userid to
  44. a username (which in turn was caused by the missing Glibc
  45. installation).</para>
  46. </sect2>