[bc82645e] | 1 | <sect2><title> </title><para> </para></sect2>
|
---|
| 2 |
|
---|
| 3 | <sect2>
|
---|
[ab6f1859] | 4 | <title>Re-installation of Binutils</title>
|
---|
[bc82645e] | 5 |
|
---|
[297d8ee0] | 6 | <note><para>It's worth pointing out that the Binutils test suite we run in this
|
---|
[ccaabde] | 7 | section is considered not as important as the one we run in Chapter 6.</para>
|
---|
[1f53626] | 8 | </note>
|
---|
| 9 |
|
---|
[677aef3] | 10 | <para>Create a separate build directory again:</para>
|
---|
[775a268] | 11 |
|
---|
[615efc85] | 12 | <para><screen><userinput>mkdir ../binutils-build
|
---|
[775a268] | 13 | cd ../binutils-build</userinput></screen></para>
|
---|
| 14 |
|
---|
| 15 | <para>Now prepare Binutils to be compiled:</para>
|
---|
| 16 |
|
---|
[148bb04] | 17 | <para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
|
---|
| 18 | --enable-shared --with-lib-path=/tools/lib</userinput></screen></para>
|
---|
[775a268] | 19 |
|
---|
[3a788f0c] | 20 | <para>The meaning of the new configure option:</para>
|
---|
| 21 |
|
---|
| 22 | <itemizedlist>
|
---|
| 23 | <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
|
---|
| 24 | the configure script to specify the default library search path. We don't want
|
---|
| 25 | the library search path to contain library directories from the host
|
---|
| 26 | system.</para></listitem>
|
---|
| 27 | </itemizedlist>
|
---|
| 28 |
|
---|
[ab6f1859] | 29 | <para>Before starting to build Binutils, remember to unset any environment
|
---|
| 30 | variables that override the default optimization flags.</para>
|
---|
| 31 |
|
---|
[775a268] | 32 | <para>Compile the package:</para>
|
---|
| 33 |
|
---|
| 34 | <para><screen><userinput>make </userinput></screen></para>
|
---|
| 35 |
|
---|
[bd10d48] | 36 | <para>Test the results (there should be no unexpected failures here, expected
|
---|
| 37 | failures are fine):</para>
|
---|
[775a268] | 38 |
|
---|
| 39 | <para><screen><userinput>make check</userinput></screen></para>
|
---|
| 40 |
|
---|
[5331519] | 41 | <para>Unfortunately, there is no easy way to view the test results summary like
|
---|
| 42 | there was for the previous GCC package. However, if a failure occurs here, it
|
---|
| 43 | should be easy to spot. The output shown will contain something like:</para>
|
---|
| 44 |
|
---|
| 45 | <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
|
---|
| 46 |
|
---|
[775a268] | 47 | <para>And install the package:</para>
|
---|
| 48 |
|
---|
| 49 | <para><screen><userinput>make install</userinput></screen></para>
|
---|
| 50 |
|
---|
[18b65e2b] | 51 | <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
|
---|
| 52 | chapter:</para>
|
---|
[bc82645e] | 53 |
|
---|
[a5b2aa9] | 54 | <para><screen><userinput>make -C ld clean
|
---|
[e91d8ce] | 55 | make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen></para>
|
---|
[384382b] | 56 |
|
---|
[e4df1fc] | 57 | <warning><para>Do not yet remove the Binutils source and build directories.
|
---|
| 58 | We'll need these directories again in the next chapter in the state they are in
|
---|
| 59 | now.</para></warning>
|
---|
[bc82645e] | 60 |
|
---|
| 61 | </sect2>
|
---|
| 62 |
|
---|