1 | <sect2><title> </title><para> </para></sect2>
|
---|
2 |
|
---|
3 | <sect2><title>Installation of Binutils</title>
|
---|
4 |
|
---|
5 | <para>Now is an appropriate time to verify that your pseudo terminals (PTYs) are
|
---|
6 | working properly inside the chroot environment. We will again quickly check that
|
---|
7 | everything is set up correctly by performing a simple test:</para>
|
---|
8 |
|
---|
9 | <screen><userinput>expect -c "spawn ls"</userinput></screen>
|
---|
10 |
|
---|
11 | <para>If you receive the message:</para>
|
---|
12 |
|
---|
13 | <blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote>
|
---|
14 |
|
---|
15 | <para>Your chroot environment is not set up for proper PTY operation. In this
|
---|
16 | case there is no point in running the test suites for Binutils and GCC until you
|
---|
17 | are able to resolve the issue. Please refer back to <xref linkend="ch06-proc"/>
|
---|
18 | and <xref linkend="ch06-makedev"/> and perform the recommended steps to fix the
|
---|
19 | problem.</para>
|
---|
20 |
|
---|
21 | <note><para>The test suite for Binutils in this section is considered
|
---|
22 | <emphasis>critical</emphasis>. Our advice is to not skip it under any
|
---|
23 | circumstances.</para> </note>
|
---|
24 |
|
---|
25 | <para>This package is known to behave badly when you have changed its
|
---|
26 | default optimization flags (including the -march and -mcpu options).
|
---|
27 | Therefore, if you have defined any environment variables that override
|
---|
28 | default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
|
---|
29 | or modifying them when building Binutils.</para>
|
---|
30 |
|
---|
31 | <para>The Binutils documentation recommends building Binutils outside of the
|
---|
32 | source directory in a dedicated build directory:</para>
|
---|
33 |
|
---|
34 | <screen><userinput>mkdir ../binutils-build
|
---|
35 | cd ../binutils-build</userinput></screen>
|
---|
36 |
|
---|
37 | <para>Now prepare Binutils for compilation:</para>
|
---|
38 |
|
---|
39 | <screen><userinput>../binutils-&binutils-version;/configure \
|
---|
40 | --prefix=/usr --enable-shared</userinput></screen>
|
---|
41 |
|
---|
42 | <para>Compile the package:</para>
|
---|
43 |
|
---|
44 | <screen><userinput>make tooldir=/usr</userinput></screen>
|
---|
45 |
|
---|
46 | <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
|
---|
47 | executables end up) is set to $(exec_prefix)/$(target_alias), which expands
|
---|
48 | into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
|
---|
49 | build for our own system, we don't need this target specific directory in
|
---|
50 | <filename>/usr</filename>. That setup would be used if the system was used to
|
---|
51 | cross-compile (for example compiling a package on an Intel machine that
|
---|
52 | generates code that can be executed on PowerPC machines).</para>
|
---|
53 |
|
---|
54 | <para>Test the results:</para>
|
---|
55 |
|
---|
56 | <screen><userinput>make check</userinput></screen>
|
---|
57 |
|
---|
58 | <para>The test suite notes from <xref linkend="ch05-binutils-pass2"/> are still
|
---|
59 | very much appropriate here. Be sure to refer back there should you have any
|
---|
60 | doubts.</para>
|
---|
61 |
|
---|
62 | <para>Install the package:</para>
|
---|
63 |
|
---|
64 | <screen><userinput>make tooldir=/usr install</userinput></screen>
|
---|
65 |
|
---|
66 | <para>Install the <emphasis>libiberty</emphasis> header file that is needed by
|
---|
67 | some packages:</para>
|
---|
68 |
|
---|
69 | <screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
|
---|
70 |
|
---|
71 | </sect2>
|
---|
72 |
|
---|