[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1770019] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
[3e36a78] | 4 | <!ENTITY % patches-entities SYSTEM "../patches.ent">
|
---|
[673b0d8] | 5 | %general-entities;
|
---|
[3e36a78] | 6 | %patches-entities;
|
---|
[673b0d8] | 7 | ]>
|
---|
[9652249] | 8 | <sect1 id="ch-tools-binutils-pass2" role="wrap">
|
---|
[673b0d8] | 9 | <title>Binutils-&binutils-version; - Pass 2</title>
|
---|
| 10 | <?dbhtml filename="binutils-pass2.html"?>
|
---|
[bc82645e] | 11 |
|
---|
[81fd230] | 12 | <indexterm zone="ch-tools-binutils-pass2">
|
---|
| 13 | <primary sortas="a-Binutils">Binutils</primary>
|
---|
| 14 | <secondary>tools, pass 2</secondary></indexterm>
|
---|
| 15 |
|
---|
[9652249] | 16 | <sect2 role="package"><title/>
|
---|
[81fd230] | 17 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 18 | href="../chapter06/binutils.xml"
|
---|
| 19 | xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
---|
[5888299] | 20 |
|
---|
[9652249] | 21 | <segmentedlist>
|
---|
| 22 | <segtitle>&buildtime;</segtitle>
|
---|
| 23 | <segtitle>&diskspace;</segtitle>
|
---|
[fad7667] | 24 | <seglistitem><seg>1.5 SBU</seg><seg>114 MB</seg></seglistitem>
|
---|
[9652249] | 25 | </segmentedlist>
|
---|
[73aedd1d] | 26 |
|
---|
[81fd230] | 27 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 28 | href="../chapter06/binutils.xml"
|
---|
| 29 | xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
|
---|
| 30 |
|
---|
[9652249] | 31 | </sect2>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="installation">
|
---|
[73aedd1d] | 34 | <title>Re-installation of Binutils</title>
|
---|
| 35 |
|
---|
[81fd230] | 36 | <para>This package is known to have issues when its default
|
---|
| 37 | optimization flags (including the <parameter>-march</parameter> and
|
---|
| 38 | <parameter>-mcpu</parameter> options) are changed. If any environment
|
---|
| 39 | variables that override default optimizations have been defined, such
|
---|
| 40 | as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
|
---|
| 41 | unset them when building Binutils.</para>
|
---|
| 42 |
|
---|
[73aedd1d] | 43 | <para>Create a separate build directory again:</para>
|
---|
| 44 |
|
---|
[54f7e8d] | 45 | <screen><userinput>mkdir -v ../binutils-build
|
---|
[73aedd1d] | 46 | cd ../binutils-build</userinput></screen>
|
---|
| 47 |
|
---|
[81fd230] | 48 | <para>Prepare Binutils for compilation:</para>
|
---|
[73aedd1d] | 49 |
|
---|
[673b0d8] | 50 | <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
|
---|
[71a091e] | 51 | --disable-nls --enable-shared --with-lib-path=/tools/lib</userinput></screen>
|
---|
[73aedd1d] | 52 |
|
---|
[fc298480] | 53 | <para>The meaning of the new configure options:</para>
|
---|
[73aedd1d] | 54 |
|
---|
[81fd230] | 55 | <variablelist>
|
---|
| 56 | <varlistentry>
|
---|
| 57 | <term><parameter>--with-lib-path=/tools/lib</parameter></term>
|
---|
| 58 | <listitem><para>This tells the configure script to specify the library
|
---|
| 59 | search path during the compilation of Binutils, resulting in <filename
|
---|
| 60 | class="directory">/tools/lib</filename> being passed to the linker.
|
---|
| 61 | This prevents the linker from searching through library directories on
|
---|
| 62 | the host.</para></listitem>
|
---|
| 63 | </varlistentry>
|
---|
| 64 | </variablelist>
|
---|
[73aedd1d] | 65 |
|
---|
[81fd230] | 66 | <para>Compile the package:</para>
|
---|
[3d36131c] | 67 |
|
---|
[81fd230] | 68 | <screen><userinput>make</userinput></screen>
|
---|
[9dfc02f] | 69 |
|
---|
[81fd230] | 70 | <para>Compilation is now complete. As discussed earlier, running the
|
---|
| 71 | test suite is not mandatory for the temporary tools here in this
|
---|
| 72 | chapter. To run the Binutils test suite anyway, issue the following
|
---|
| 73 | command:</para>
|
---|
[9dfc02f] | 74 |
|
---|
[81fd230] | 75 | <screen><userinput>make check</userinput></screen>
|
---|
[9dfc02f] | 76 |
|
---|
[81fd230] | 77 | <para>Install the package:</para>
|
---|
[73aedd1d] | 78 |
|
---|
| 79 | <screen><userinput>make install</userinput></screen>
|
---|
| 80 |
|
---|
[574b0ea] | 81 | <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in the next
|
---|
[73aedd1d] | 82 | chapter:</para>
|
---|
| 83 |
|
---|
| 84 | <screen><userinput>make -C ld clean
|
---|
| 85 | make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
|
---|
| 86 |
|
---|
| 87 |
|
---|
[81fd230] | 88 | <warning><para><emphasis>Do not</emphasis> remove the Binutils source and
|
---|
| 89 | build directories yet. These directories will be needed again in the next
|
---|
| 90 | chapter in their current state.</para></warning>
|
---|
[73aedd1d] | 91 |
|
---|
[0868461] | 92 | </sect2>
|
---|
[5888299] | 93 |
|
---|
[81fd230] | 94 | <sect2 role="content"><title/>
|
---|
| 95 | <para>Details on this package are located in <xref
|
---|
| 96 | linkend="contents-binutils" role="."/></para>
|
---|
| 97 | </sect2>
|
---|
| 98 |
|
---|
[bc82645e] | 99 | </sect1>
|
---|
[81fd230] | 100 |
|
---|