| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/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 <xreflinkend="chapter-temporary-tools"/> will be installed under <filenameclass="directory">$LFS/tools</filename> to keep them separate from theprograms compiled in <xref linkend="chapter-building-system"/>. Theprograms compiled here are temporary tools and will not be a part ofthe final LFS system.  By keeping these programs in a separatedirectory, they can easily be discarded later after their use. Thisalso prevents these programs from ending up in the host productiondirectories (easy to do by accident in <xreflinkend="chapter-temporary-tools"/>).</para><para>Create the required directory by running the following as<emphasis>root</emphasis>:</para><screen><userinput>mkdir $LFS/tools</userinput></screen><para>The next step is to create a <filename class="symlink">/tools</filename> symlink on the host system.  This will point to the newly-created directory onthe LFS partition. Run this command as <emphasis>root</emphasis> aswell:</para><screen><userinput>ln -s $LFS/tools /</userinput></screen><note><para>The above command is correct. The <command>ln</command> command hasa few syntactic variations, so be sure to check <command>info coreutils ln</command> and<filename>ln(1)</filename> before reporting what you may think is anerror.</para></note><para>The created symlink enables the toolchain to be compiled so thatit always refers to <filename class="directory">/tools</filename>,meaning that the compiler, assembler, and linker will work both inthis chapter (when we are still using some tools from the host) and inthe next (when we are <quote>chrooted</quote> to the LFSpartition).</para></sect1>
 |