creatingstage1dir.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. <sect1 id="ch05-creatingtoolsdir">
  2. <title>Creating the $LFS/tools directory</title>
  3. <?dbhtml filename="creatingtoolsdir.html" dir="chapter05"?>
  4. <para>All programs compiled in this chapter will be installed under <filename
  5. class="directory">$LFS/tools</filename> to keep them separate from the
  6. programs compiled in the next chapter. The programs compiled here are only
  7. temporary tools and won't be a part of the final LFS system and by keeping them
  8. in a separate directory, we can later easily throw them away.</para>
  9. <para>If later you wish to search through the binaries of your system to see
  10. what files they make use of or link against, then to make this searching easier
  11. you may want to choose a unique name. Instead of the simple "tools" you could
  12. use something like "tools-for-lfs".</para>
  13. <para>Create the required directory by running the following:</para>
  14. <para><screen><userinput>mkdir $LFS/tools</userinput></screen></para>
  15. <para>The next step is to create a <filename>/tools</filename> symlink on
  16. your host system. It will point to the directory we just created on the LFS
  17. partition:</para>
  18. <para><screen><userinput>ln -s $LFS/tools /</userinput></screen></para>
  19. <para>This symlink enables us to compile our toolchain so that it always
  20. refers to <filename>/tools</filename>, meaning that the compiler, assembler
  21. and linker will work both in this chapter (when we are still using some tools
  22. from the host) <emphasis>and</emphasis> in the next (when we are chrooted to
  23. the LFS partition).</para>
  24. </sect1>