Added a few comments here and there
[linux_from_scratch.git] / newxml / chapter05 / binutils-pass2.xml
blob400cb58524bb7ed5853cbb3d42fbdea843828ec2
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd" [
3   <!ENTITY % binutils-entities SYSTEM "../ent/binutils.ent">
4   %binutils-entities;
5 ]>
6 <sect1 id="ch05-binutils-pass2">
7 <title>Installing Binutils-&binutils-version; - Pass 2</title>
8 <?dbhtml filename="binutils-pass2.html"?>
10 <screen>Estimated build time:           1.5 SBU
11 Estimated required disk space:  108 MB</screen>
15 <sect2>
16 <title>Re-installation of Binutils</title>
18 <para>Create a separate build directory again:</para>
20 <screen><userinput>mkdir ../binutils-build
21 cd ../binutils-build</userinput></screen>
23 <para>Now prepare Binutils for compilation:</para>
25 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
26     --enable-shared --with-lib-path=/tools/lib</userinput></screen>
28 <para>The meaning of the new configure option:</para>
30 <itemizedlist>
31 <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
32 the configure script to specify the default library search path. We don't want
33 the library search path to contain library directories from the host
34 system.</para></listitem>
35 </itemizedlist>
37 <para>Before starting to build Binutils, remember to unset any environment
38 variables that override the default optimization flags.</para>
40 <para>Compile the package:</para>
42 <screen><userinput>make</userinput></screen>
44 <note><para>It's worth pointing out that running the Binutils test suite here
45 is considered not as important as running it in
46 <xref linkend="chapter06"/>.</para></note>
48 <para>Test the results (there should be no unexpected failures here, expected
49 failures are fine):</para>
51 <screen><userinput>make check</userinput></screen>
53 <para>Unfortunately, there is no easy way to view the test results summary like
54 there was for the previous GCC package. However, if a failure occurs here, it
55 should be easy to spot. The output shown will contain something like:</para>
57 <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
59 <para>And install the package:</para>                                              
61 <screen><userinput>make install</userinput></screen>
63 <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
64 chapter:</para>
66 <screen><userinput>make -C ld clean
67 make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
70 <warning><para>Do not yet remove the Binutils source and build directories.
71 We'll need these directories again in the next chapter in the state they are in
72 now.</para></warning>
75 </sect2>
77 </sect1>