chapter05.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <chapter id="chapter05">
  2. <title>Constructing a temporary system</title>
  3. <?dbhtml filename="chapter05.html" dir="chapter05"?>
  4. &c5-introduction;
  5. &c5-whystatic;
  6. &c5-creatingtoolsdir;
  7. &c5-addinguser;
  8. &c5-settingenviron;
  9. &c5-binutils-pass1;
  10. &c5-gcc-pass1;
  11. &c5-kernelheaders;
  12. &c5-glibc;
  13. &c5-lockingglibc;
  14. &c5-tcl;
  15. &c5-expect;
  16. &c5-dejagnu;
  17. &c5-gcc-pass2;
  18. &c5-binutils-pass2;
  19. &c5-gawk;
  20. &c5-coreutils;
  21. &c5-bzip2;
  22. &c5-gzip;
  23. &c5-diffutils;
  24. &c5-findutils;
  25. &c5-make;
  26. &c5-grep;
  27. &c5-sed;
  28. &c5-gettext;
  29. &c5-ncurses;
  30. &c5-patch;
  31. &c5-tar;
  32. &c5-texinfo;
  33. &c5-bash;
  34. &c5-utillinux;
  35. &c5-perl;
  36. <sect1 id="ch05-stripping">
  37. <title>Stripping</title>
  38. <?dbhtml filename="stripping.html" dir="chapter05"?>
  39. <para>The steps in this section are optional. If your LFS partition is rather
  40. small, you will be glad to learn that you can throw away some unnecessary
  41. things. The executables and libraries you have built so far contain about 130 MB
  42. of unneeded debugging symbols. Remove those symbols like this:</para>
  43. <para><screen><userinput>strip --strip-unneeded /tools/{,s}bin/*
  44. strip --strip-debug /tools/lib/*</userinput></screen></para>
  45. <para>The first of the above commands will skip some twenty files, reporting
  46. that it doesn't recognize their file format. Most of them are scripts instead
  47. of binaries.</para>
  48. <para>Take care <emphasis>not</emphasis> to use
  49. <userinput>--strip-unneeded</userinput> on the libraries -- they would be
  50. destroyed and you would have to build Glibc all over again.</para>
  51. <para>To save another couple of megabytes, you can throw away all the
  52. documentation:</para>
  53. <para><screen><userinput>rm -rf /tools/{,share/}{doc,info,man}</userinput></screen></para>
  54. <para>You will now need to have at least 700 MB of free space on your LFS
  55. filesystem to be able to build and install Glibc in the next phase.</para>
  56. </sect1>
  57. </chapter>