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