[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 \
|
---|
| 44 | --disable-nls --enable-shared --enable-64-bit-bfd</userinput></screen>
|
---|
| 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>
|
---|
[ed8de1a] | 61 | <para>When used injunction with --target, this creates a cross-architecture
|
---|
| 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>
|
---|
[ed8de1a] | 69 | <para>When used injunction with --host, this creates a cross-architecture
|
---|
| 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">
|
---|
| 101 | <term><parameter>--enable-64-bit-bfd</parameter></term>
|
---|
| 102 | <listitem>
|
---|
[ed8de1a] | 103 | <para>This adds 64 bit support to our toolchain. This flag will not
|
---|
| 104 | interfere with 32 bit builds.</para>
|
---|
| 105 | </listitem>
|
---|
| 106 | </varlistentry>
|
---|
| 107 |
|
---|
| 108 | <varlistentry os="bd8">
|
---|
| 109 | <term><parameter>--disable-multilib</parameter></term>
|
---|
| 110 | <listitem>
|
---|
| 111 | <para>This options disables the building of a multilib
|
---|
| 112 | capable binutils.</para>
|
---|
[3f8be484] | 113 | </listitem>
|
---|
| 114 | </varlistentry>
|
---|
| 115 |
|
---|
| 116 | </variablelist>
|
---|
| 117 |
|
---|
| 118 | <para os="be">Compile the package:</para>
|
---|
| 119 |
|
---|
| 120 | <screen os="bf"><userinput>make configure-host
|
---|
| 121 | make</userinput></screen>
|
---|
| 122 |
|
---|
[ed8de1a] | 123 | <variablelist os="bg">
|
---|
[3f8be484] | 124 | <title>The meaning of the make options:</title>
|
---|
| 125 |
|
---|
[ed8de1a] | 126 | <varlistentry os="bg1">
|
---|
[3f8be484] | 127 | <term><parameter>configure-host</parameter></term>
|
---|
| 128 | <listitem>
|
---|
[ed8de1a] | 129 | <para>This checks the host environment and makes sure all the
|
---|
| 130 | necessary tools are available to compile binutils.</para>
|
---|
[3f8be484] | 131 | </listitem>
|
---|
| 132 | </varlistentry>
|
---|
| 133 |
|
---|
| 134 | </variablelist>
|
---|
| 135 |
|
---|
[ed8de1a] | 136 | <para os="bh">Install the package:</para>
|
---|
[3f8be484] | 137 |
|
---|
[ed8de1a] | 138 | <screen os="bi"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 139 |
|
---|
[ed8de1a] | 140 | <para os="bj">Copy <filename class="headerfile">libiberty.h</filename> file to
|
---|
[3f8be484] | 141 | <filename class="directory">/tools/include</filename> directory:</para>
|
---|
| 142 |
|
---|
[ed8de1a] | 143 | <screen os="bk"><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /tools/include</userinput></screen>
|
---|
[3f8be484] | 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | <sect2 role="content">
|
---|
| 148 | <title/>
|
---|
| 149 |
|
---|
| 150 | <para>Details on this package are located in <xref
|
---|
| 151 | linkend="contents-binutils" role="."/></para>
|
---|
| 152 |
|
---|
| 153 | </sect2>
|
---|
| 154 |
|
---|
| 155 | </sect1>
|
---|