2004-01-27 22:29:49 +00:00
|
|
|
<sect1 id="ch-system-binutils" xreflabel="Binutils">
|
2001-07-23 19:23:43 +01:00
|
|
|
<title>Installing Binutils-&binutils-version;</title>
|
2001-09-26 01:24:04 +01:00
|
|
|
<?dbhtml filename="binutils.html" dir="chapter06"?>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2004-01-12 23:23:50 +00:00
|
|
|
<para>The Binutils package contains a linker, an assembler, and other tools for
|
|
|
|
handling object files.</para>
|
|
|
|
|
2004-01-27 22:27:44 +00:00
|
|
|
<screen>&buildtime; &binutils-time;
|
|
|
|
&diskspace; &binutils-compsize;</screen>
|
2001-07-17 19:51:18 +01:00
|
|
|
|
2004-01-12 23:23:50 +00:00
|
|
|
&aa-binutils-down;
|
2003-11-15 16:07:18 +00:00
|
|
|
&aa-binutils-dep;
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
|
|
|
|
<sect2><title>Installation of Binutils</title>
|
|
|
|
|
|
|
|
<para>Now is an appropriate time to verify that your pseudo terminals (PTYs) are
|
|
|
|
working properly inside the chroot environment. We will again quickly check that
|
|
|
|
everything is set up correctly by performing a simple test:</para>
|
|
|
|
|
|
|
|
<screen><userinput>expect -c "spawn ls"</userinput></screen>
|
|
|
|
|
|
|
|
<para>If you receive the message:</para>
|
|
|
|
|
|
|
|
<blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote>
|
|
|
|
|
|
|
|
<para>Your chroot environment is not set up for proper PTY operation. In this
|
|
|
|
case there is no point in running the test suites for Binutils and GCC until you
|
2004-01-27 22:29:49 +00:00
|
|
|
are able to resolve the issue. Please refer back to <xref linkend="ch-system-proc"/>
|
|
|
|
and the <xref linkend="ch-system-MAKEDEV"/> section and perform the recommended steps
|
2004-01-20 05:59:05 +00:00
|
|
|
to fix the problem.</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<para>This package is known to behave badly when you have changed its
|
|
|
|
default optimization flags (including the -march and -mcpu options).
|
|
|
|
Therefore, if you have defined any environment variables that override
|
|
|
|
default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
|
|
|
|
or modifying them when building Binutils.</para>
|
|
|
|
|
|
|
|
<para>The Binutils documentation recommends building Binutils outside of the
|
|
|
|
source directory in a dedicated build directory:</para>
|
|
|
|
|
|
|
|
<screen><userinput>mkdir ../binutils-build
|
|
|
|
cd ../binutils-build</userinput></screen>
|
|
|
|
|
|
|
|
<para>Now prepare Binutils for compilation:</para>
|
|
|
|
|
2004-02-01 21:48:13 +00:00
|
|
|
<screen><userinput>../&binutils-dir;/configure --prefix=/usr --enable-shared</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make tooldir=/usr</userinput></screen>
|
|
|
|
|
|
|
|
<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
|
|
|
|
executables end up) is set to $(exec_prefix)/$(target_alias), which expands
|
|
|
|
into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
|
|
|
|
build for our own system, we don't need this target specific directory in
|
|
|
|
<filename>/usr</filename>. That setup would be used if the system was used to
|
|
|
|
cross-compile (for example compiling a package on an Intel machine that
|
|
|
|
generates code that can be executed on PowerPC machines).</para>
|
|
|
|
|
2004-01-28 22:10:21 +00:00
|
|
|
<important><para>The test suite for Binutils in this section is considered
|
|
|
|
<emphasis>critical</emphasis>. Our advice is to not skip it under any
|
|
|
|
circumstances.</para></important>
|
|
|
|
|
2003-11-01 22:31:50 +00:00
|
|
|
<para>Test the results:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make check</userinput></screen>
|
|
|
|
|
2004-01-27 22:29:49 +00:00
|
|
|
<para>The test suite notes from <xref linkend="ch-tools-binutils-pass2"/> are still
|
2003-11-01 22:31:50 +00:00
|
|
|
very much appropriate here. Be sure to refer back there should you have any
|
|
|
|
doubts.</para>
|
|
|
|
|
|
|
|
<para>Install the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make tooldir=/usr install</userinput></screen>
|
|
|
|
|
|
|
|
<para>Install the <emphasis>libiberty</emphasis> header file that is needed by
|
|
|
|
some packages:</para>
|
|
|
|
|
2004-01-22 23:56:16 +00:00
|
|
|
<screen><userinput>cp ../&binutils-dir;/include/libiberty.h /usr/include</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
</sect2>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2004-01-12 23:23:50 +00:00
|
|
|
&aa-binutils-shortdesc;
|
|
|
|
&aa-binutils-desc;
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect1>
|
2003-11-01 22:31:50 +00:00
|
|
|
|