aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/binutils-pass1-inst.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/binutils-pass1-inst.xml')
-rw-r--r--chapter05/binutils-pass1-inst.xml38
1 files changed, 22 insertions, 16 deletions
diff --git a/chapter05/binutils-pass1-inst.xml b/chapter05/binutils-pass1-inst.xml
index 13f478daa..2adbdf700 100644
--- a/chapter05/binutils-pass1-inst.xml
+++ b/chapter05/binutils-pass1-inst.xml
@@ -3,11 +3,15 @@
<sect2>
<title>Installation of Binutils</title>
+<para>It is important that Binutils be the first package to get compiled,
+because both Glibc and GCC perform various tests on the available linker and
+assembler to determine which of their own features to enable.</para>
+
<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>
+modifying them when building Binutils.</para>
<para>It is recommended by the Binutils installation documentation to build
Binutils outside of the source directory in a dedicated directory:</para>
@@ -20,13 +24,16 @@ cd ../binutils-build</userinput></screen></para>
<para><screen><userinput>../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;--prefix=/stage1 --disable-nls</userinput></screen></para>
-<para>The meaning of the (new) configure switches are:</para>
+<para>The meaning of the configure switches is:</para>
<itemizedlist>
-<listitem><para><userinput>--disable-nls</userinput>: This option disables
-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>
+<listitem><para><userinput>--prefix=/stage1</userinput>: This tells the
+configure script to prepare to install the Binutils programs in the
+<filename>/stage1</filename> directory.</para></listitem>
+<listitem><para><userinput>--disable-nls</userinput>: This disables
+internationalization (a word often shortened to i18n). We don't need this
+for our static programs and <emphasis>nls</emphasis> often causes problems
+when linking statically.</para></listitem>
</itemizedlist>
<para>Continue with compiling the package:</para>
@@ -36,24 +43,23 @@ statically.</para></listitem>
<para>The meaning of the make option is:</para>
<itemizedlist>
-<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This is
-how we tell Binutils that all programs should be statically linked. Setting
-the <emphasis>LDFLAGS</emphasis> variable is the common way of specifying we
-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>
-variable.</para></listitem>
+<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells
+the linker that all the Binutils programs should be linked
+statically.</para></listitem>
</itemizedlist>
-<para>And finish off installing the package:</para>
+<para>And install the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
+<para>Now already prepare the linker for the "locking in" of
+<emphasis>glibc</emphasis> later on:</para>
+
<para><screen><userinput>make -C ld clean
make -C ld LIB_PATH=/stage1/lib</userinput></screen></para>
-<para>Do not remove the binutils-* directories. We need them again
-later on in this chapter.</para>
+<para><emphasis>Do not yet remove</emphasis> the binutils-* directories.
+We will need them again a bit further on in this chapter.</para>
</sect2>