| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  %general-entities;]><sect1 id="ch-tools-creatingtoolsdir"><title>Creating the $LFS/tools directory</title><?dbhtml filename="creatingtoolsdir.html"?><para>All programs compiled in this chapter will be installed under <filename class="directory">$LFS/tools</filename> to keep them separate from theprograms compiled in the next chapter. The programs compiled here are onlytemporary tools and won't be a part of the final LFS system and by keeping themin a separate directory, we can later easily throw them away. This alsohelps prevent them from ending up in your host's production directories(easy to do in Chapter 5), which could be a very bad thing.</para><para>Later on you might wish to search through the binaries of your system tosee what files they make use of or link against. To make this searching easieryou may want to choose a unique name for the directory in which the temporarytools are stored. Instead of the simple <quote>tools</quote> you could usesomething like <quote>tools-for-lfs</quote>. However, you'll need to be carefulto adjust all references to <quote>tools</quote> throughout the book --including those in any patches, notably the GCC Specs Patch.</para><para>Create the required directory by running the following:</para><screen><userinput>mkdir $LFS/tools</userinput></screen><para>The next step is to create a <filename>/tools</filename> symlink onyour <emphasis>host</emphasis> system. It will point to the directory we just created on the LFSpartition:</para><screen><userinput>ln -s $LFS/tools /</userinput></screen><note><para>The above command is correct. The <command>ln</command> commandhas a few syntactic variations, so be sure to check the info page beforereporting what you may think is an error.</para></note><para>The created symlink enables us to compile our toolchain so that it alwaysrefers to <filename>/tools</filename>, meaning that the compiler, assemblerand linker will work both in this chapter (when we are still using some toolsfrom the host) <emphasis>and</emphasis> in the next (when we are <quote>chrooted</quote> tothe LFS partition).</para></sect1>
 |