creatingtoolsdir.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-tools-creatingtoolsdir">
  7. <title>Creating the $LFS/tools Directory</title>
  8. <?dbhtml filename="creatingtoolsdir.html"?>
  9. <para>All programs compiled in <xref
  10. linkend="chapter-temporary-tools"/> will be installed under <filename
  11. class="directory">$LFS/tools</filename> to keep them separate from the
  12. programs compiled in <xref linkend="chapter-building-system"/>. The
  13. programs compiled here are temporary tools and will not be a part of
  14. the final LFS system. By keeping these programs in a separate
  15. directory, they can easily be discarded later after their use. This
  16. also prevents these programs from ending up in the host production
  17. directories (easy to do by accident in <xref
  18. linkend="chapter-temporary-tools"/>).</para>
  19. <para>Create the required directory by running the following as
  20. <emphasis>root</emphasis>:</para>
  21. <screen><userinput>mkdir -v $LFS/tools</userinput></screen>
  22. <para>The next step is to create a <filename class="symlink">/tools</filename>
  23. symlink on the host system. This will point to the newly-created directory on
  24. the LFS partition. Run this command as <emphasis>root</emphasis> as
  25. well:</para>
  26. <screen><userinput>ln -sv $LFS/tools /</userinput></screen>
  27. <note><para>The above command is correct. The <command>ln</command> command has
  28. a few syntactic variations, so be sure to check <command>info coreutils ln</command> and
  29. <filename>ln(1)</filename> before reporting what you may think is an
  30. error.</para></note>
  31. <para>The created symlink enables the toolchain to be compiled so that
  32. it always refers to <filename class="directory">/tools</filename>,
  33. meaning that the compiler, assembler, and linker will work both in
  34. this chapter (when we are still using some tools from the host) and in
  35. the next (when we are <quote>chrooted</quote> to the LFS
  36. partition).</para>
  37. </sect1>