diff options
Diffstat (limited to 'chapter06/binutils-inst.xml')
-rw-r--r-- | chapter06/binutils-inst.xml | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/chapter06/binutils-inst.xml b/chapter06/binutils-inst.xml index 3ccc05b91..4027d7791 100644 --- a/chapter06/binutils-inst.xml +++ b/chapter06/binutils-inst.xml @@ -1,3 +1,5 @@ +<sect2><title> </title><para> </para></sect2> + <sect2><title>Installation of Binutils</title> <para>This package is known to behave badly when you have changed its @@ -7,15 +9,40 @@ that override default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting or modifying them when building binutils. You have been warned.</para> -<para>Install Binutils by running the following commands:</para> +<para>It is recommended by the Binutils installation documentation to build +Binutils outside of the source directory. Create the build directory:</para> <para><screen><userinput>mkdir ../binutils-build && -cd ../binutils-build && -../binutils-&binutils-version;/configure --prefix=/usr --enable-shared && -make tooldir=/usr && -make tooldir=/usr install && -make tooldir=/usr install-info && -cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para> +cd ../binutils-build</userinput></screen></para> + +<para>Next, prepare Binutils to be compiled:</para> + +<para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr --enable-shared</userinput></screen></para> + +<para>Continue with compiling the package:</para> + +<para><screen><userinput>make tooldir=/usr</userinput></screen></para> + +<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, /usr/i686-pc-linux-gnu. Since we only build for our +own system, we don't need this target specific directory in /usr. That +setup would be used if the system was used to cross-compile (for example +compiling a package on the Intel machine that generates code that can be +executed on Apple PowerPC machines).</para> + +<para>Install the package:</para> + +<para><screen><userinput>make tooldir=/usr install</userinput></screen></para> + +<para>Install the info pages:</para> + +<para><screen><userinput>make tooldir=/usr install-info</userinput></screen></para> + +<para>Some packages require the <emphasis>libiberty</emphasis> header +in order to build. To honor those packages, install the file:</para> + +<para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para> </sect2> |