[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-cross-tools-binutils" role="wrap">
|
---|
| 9 | <?dbhtml filename="binutils.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Cross Binutils-&binutils-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-cross-tools-binutils">
|
---|
| 14 | <primary sortas="a-Binutils">Binutils</primary>
|
---|
| 15 | <secondary>cross tools</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
[cf66ceae] | 18 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 19 | href="../../final-system/common/binutils.xml"
|
---|
| 20 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
[3f8be484] | 21 |
|
---|
| 22 | <sect2 role="installation">
|
---|
| 23 | <title>Installation of Cross Binutils</title>
|
---|
| 24 |
|
---|
| 25 | <para os="ba">To make sure that the proper syntax is used for a couple of
|
---|
| 26 | tools, apply the following patch:</para>
|
---|
| 27 |
|
---|
| 28 | <screen os="bb"><userinput>patch -Np1 -i ../&binutils-posix-patch;</userinput></screen>
|
---|
| 29 |
|
---|
| 30 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 31 | href="../../final-system/common/binutils.xml"
|
---|
| 32 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 33 |
|
---|
| 34 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 35 | href="../../final-system/common/binutils.xml"
|
---|
| 36 | xpointer="xpointer(//*[@os='h'])"/>
|
---|
| 37 |
|
---|
| 38 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 39 | href="../../final-system/common/binutils.xml"
|
---|
| 40 | xpointer="xpointer(//*[@os='i'])"/>
|
---|
| 41 |
|
---|
| 42 | <screen os="bc"><userinput>../binutils-&binutils-version;/configure --prefix=/cross-tools \
|
---|
| 43 | --host=${LFS_HOST} --target=${LFS_TARGET} --with-lib-path=/tools/lib \
|
---|
[2185dca] | 44 | --disable-nls --enable-shared --disable-multilib</userinput></screen>
|
---|
[3f8be484] | 45 |
|
---|
| 46 | <variablelist os="bd">
|
---|
| 47 | <title>The meaning of the configure options:</title>
|
---|
| 48 |
|
---|
| 49 | <varlistentry os="bd1">
|
---|
| 50 | <term><parameter>--prefix=/cross-tools</parameter></term>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>This tells the configure script to prepare to install the
|
---|
| 53 | package in the <filename class="directory">/cross-tools</filename>
|
---|
| 54 | directory.</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | </varlistentry>
|
---|
| 57 |
|
---|
| 58 | <varlistentry os="bd2">
|
---|
| 59 | <term><parameter>--host=${LFS_HOST}</parameter></term>
|
---|
| 60 | <listitem>
|
---|
[6bb43b3] | 61 | <para>When used with --target, this creates a cross-architecture
|
---|
[ed8de1a] | 62 | executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).</para>
|
---|
[3f8be484] | 63 | </listitem>
|
---|
| 64 | </varlistentry>
|
---|
| 65 |
|
---|
| 66 | <varlistentry os="bd3">
|
---|
| 67 | <term><parameter>--target=${LFS_TARGET}</parameter></term>
|
---|
| 68 | <listitem>
|
---|
[6bb43b3] | 69 | <para>When used with --host, this creates a cross-architecture
|
---|
[ed8de1a] | 70 | executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).</para>
|
---|
[3f8be484] | 71 | </listitem>
|
---|
| 72 | </varlistentry>
|
---|
| 73 |
|
---|
| 74 | <varlistentry os="bd4">
|
---|
| 75 | <term><parameter>--with-lib-path=/tools/lib</parameter></term>
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>This tells the configure script to specify the library
|
---|
| 78 | search path during the compilation of Binutils, resulting in
|
---|
| 79 | <filename class="directory">/tools/lib</filename> being passed
|
---|
| 80 | to the linker. This prevents the linker from searching through
|
---|
| 81 | library directories on the host.</para>
|
---|
| 82 | </listitem>
|
---|
| 83 | </varlistentry>
|
---|
| 84 |
|
---|
| 85 | <varlistentry os="bd5">
|
---|
| 86 | <term><parameter>--disable-nls</parameter></term>
|
---|
| 87 | <listitem>
|
---|
| 88 | <para>This disables internationalization as i18n is not needed for the
|
---|
| 89 | cross-compile tools.</para>
|
---|
| 90 | </listitem>
|
---|
| 91 | </varlistentry>
|
---|
| 92 |
|
---|
| 93 | <varlistentry os="bd6">
|
---|
| 94 | <term><parameter>--enable-shared</parameter></term>
|
---|
| 95 | <listitem>
|
---|
| 96 | <para>Enable the creation of the shared libraries.</para>
|
---|
| 97 | </listitem>
|
---|
| 98 | </varlistentry>
|
---|
| 99 |
|
---|
| 100 | <varlistentry os="bd7">
|
---|
[ed8de1a] | 101 | <term><parameter>--disable-multilib</parameter></term>
|
---|
| 102 | <listitem>
|
---|
[8659630] | 103 | <para>This option disables the building of a multilib
|
---|
[ed8de1a] | 104 | capable binutils.</para>
|
---|
[3f8be484] | 105 | </listitem>
|
---|
| 106 | </varlistentry>
|
---|
| 107 |
|
---|
| 108 | </variablelist>
|
---|
| 109 |
|
---|
| 110 | <para os="be">Compile the package:</para>
|
---|
| 111 |
|
---|
| 112 | <screen os="bf"><userinput>make configure-host
|
---|
| 113 | make</userinput></screen>
|
---|
| 114 |
|
---|
[ed8de1a] | 115 | <variablelist os="bg">
|
---|
[3f8be484] | 116 | <title>The meaning of the make options:</title>
|
---|
| 117 |
|
---|
[ed8de1a] | 118 | <varlistentry os="bg1">
|
---|
[3f8be484] | 119 | <term><parameter>configure-host</parameter></term>
|
---|
| 120 | <listitem>
|
---|
[ed8de1a] | 121 | <para>This checks the host environment and makes sure all the
|
---|
| 122 | necessary tools are available to compile binutils.</para>
|
---|
[3f8be484] | 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
| 126 | </variablelist>
|
---|
| 127 |
|
---|
[ed8de1a] | 128 | <para os="bh">Install the package:</para>
|
---|
[3f8be484] | 129 |
|
---|
[ed8de1a] | 130 | <screen os="bi"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 131 |
|
---|
[6d4c909] | 132 | <para os="bj">Copy the <filename class="headerfile">libiberty.h</filename> file to
|
---|
[3f8be484] | 133 | <filename class="directory">/tools/include</filename> directory:</para>
|
---|
| 134 |
|
---|
[f729ad2] | 135 | <screen os="bk"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /tools/include</userinput></screen>
|
---|
[3f8be484] | 136 |
|
---|
| 137 | </sect2>
|
---|
| 138 |
|
---|
| 139 | <sect2 role="content">
|
---|
| 140 | <title/>
|
---|
| 141 |
|
---|
| 142 | <para>Details on this package are located in <xref
|
---|
| 143 | linkend="contents-binutils" role="."/></para>
|
---|
| 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | </sect1>
|
---|