1 | <sect2><title> </title><para> </para></sect2>
|
---|
2 |
|
---|
3 | <sect2><title>Installation of Binutils</title>
|
---|
4 |
|
---|
5 | <note><para>The test suite for Binutils in this chapter is considered
|
---|
6 | <emphasis>critical</emphasis>. Do not skip it under any circumstances.</para>
|
---|
7 | </note>
|
---|
8 |
|
---|
9 | <para>This package is known to behave badly when you have changed its
|
---|
10 | default optimization flags (including the -march and -mcpu options).
|
---|
11 | Therefore, if you have defined any environment variables that override
|
---|
12 | default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
|
---|
13 | or modifying them when building Binutils.</para>
|
---|
14 |
|
---|
15 | <para>The Binutils documentation recommends building Binutils outside of the
|
---|
16 | source directory in a dedicated build directory:</para>
|
---|
17 |
|
---|
18 | <para><screen><userinput>mkdir ../binutils-build
|
---|
19 | cd ../binutils-build</userinput></screen></para>
|
---|
20 |
|
---|
21 | <para>Now prepare Binutils for compilation:</para>
|
---|
22 |
|
---|
23 | <para><screen><userinput>../binutils-&binutils-version;/configure \
|
---|
24 | --prefix=/usr --enable-shared</userinput></screen></para>
|
---|
25 |
|
---|
26 | <para>Compile the package:</para>
|
---|
27 |
|
---|
28 | <para><screen><userinput>make tooldir=/usr</userinput></screen></para>
|
---|
29 |
|
---|
30 | <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
|
---|
31 | executables end up) is set to $(exec_prefix)/$(target_alias), which expands
|
---|
32 | into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
|
---|
33 | build for our own system, we don't need this target specific directory in
|
---|
34 | <filename>/usr</filename>. That setup would be used if the system was used to
|
---|
35 | cross-compile (for example compiling a package on an Intel machine that
|
---|
36 | generates code that can be executed on PowerPC machines).</para>
|
---|
37 |
|
---|
38 | <para>Test the results:</para>
|
---|
39 |
|
---|
40 | <para><screen><userinput>make check</userinput></screen></para>
|
---|
41 |
|
---|
42 | <para>Install the package:</para>
|
---|
43 |
|
---|
44 | <para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
|
---|
45 |
|
---|
46 | <para>Install the <emphasis>libiberty</emphasis> header file that is needed by
|
---|
47 | some packages:</para>
|
---|
48 |
|
---|
49 | <para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para>
|
---|
50 |
|
---|
51 | </sect2>
|
---|
52 |
|
---|