2003-01-11 16:24:56 +00:00
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Installation of Binutils</title>
|
|
|
|
|
2001-09-20 02:47:28 +01:00
|
|
|
<para>This package is known to behave badly when you have changed its default
|
2003-01-30 05:06:58 +00:00
|
|
|
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>
|
2001-09-05 15:13:36 +01:00
|
|
|
|
2003-01-11 16:18:59 +00:00
|
|
|
<para>It is recommended by the Binutils installation documentation to build
|
|
|
|
Binutils outside of the source directory in a dedicated directory:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2003-01-11 16:18:59 +00:00
|
|
|
<para><screen><userinput>mkdir ../binutils-build
|
|
|
|
cd ../binutils-build</userinput></screen></para>
|
2002-01-30 16:11:56 +00:00
|
|
|
|
2003-01-11 16:18:59 +00:00
|
|
|
<para>Next, prepare Binutils to be compiled:</para>
|
|
|
|
|
2003-05-11 00:48:26 +01:00
|
|
|
<para><screen><userinput>../binutils-&binutils-version;/configure \
|
2003-05-06 20:21:57 +01:00
|
|
|
--prefix=/stage1 --disable-nls</userinput></screen></para>
|
2003-01-11 16:18:59 +00:00
|
|
|
|
|
|
|
<para>The meaning of the (new) configure switches are:</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
2003-02-03 23:24:24 +00:00
|
|
|
<listitem><para><userinput>--disable-nls</userinput>: This option disables
|
2003-01-11 16:18:59 +00:00
|
|
|
internationalization (also known as i18n). We don't need this for our
|
|
|
|
static programs and nls often causes problems when you're linking
|
|
|
|
statically.</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2003-01-11 17:41:17 +00:00
|
|
|
<para>Continue with compiling the package:</para>
|
2003-01-11 16:18:59 +00:00
|
|
|
|
2003-05-11 00:48:26 +01:00
|
|
|
<para><screen><userinput>make tooldir=/stage1 LDFLAGS="-all-static"</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2003-01-11 16:42:50 +00:00
|
|
|
<para>The meaning of the make option is:</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
2003-02-03 23:24:24 +00:00
|
|
|
<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This is
|
2003-01-11 16:42:50 +00:00
|
|
|
how we tell Binutils that all programs should be statically linked. Setting
|
|
|
|
the <emphasis>LDFLAGS</emphasis> variable is the common way of specifying we
|
2003-01-11 16:18:59 +00:00
|
|
|
want a static link to take place, however, its value and the way it is set
|
|
|
|
is not always the same. You'll see with the remaining packages that there
|
|
|
|
are different ways of setting up the <emphasis>LDFLAGS</emphasis>
|
2003-01-11 16:42:50 +00:00
|
|
|
variable.</para></listitem>
|
|
|
|
</itemizedlist>
|
2003-01-11 16:18:59 +00:00
|
|
|
|
2003-01-11 17:41:17 +00:00
|
|
|
<para>And finish off installing the package:</para>
|
|
|
|
|
2003-05-11 00:29:43 +01:00
|
|
|
<para><screen><userinput>make tooldir=/stage1 install</userinput></screen></para>
|
2003-01-11 17:41:17 +00:00
|
|
|
|
2003-05-02 19:20:20 +01:00
|
|
|
<para><screen><userinput>make -C ld clean
|
2003-05-11 00:29:43 +01:00
|
|
|
make -C ld tooldir=/stage1 LIB_PATH=/stage1/lib</userinput></screen></para>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2003-05-02 22:18:33 +01:00
|
|
|
<para>Do not remove the binutils-* directories. We need them again
|
2003-05-02 21:44:44 +01:00
|
|
|
later on in this chapter.</para>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect2>
|
|
|
|
|