| 1 | <?xml version="1.0" encoding="ISO-8859-1"?> | 
|---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | 
|---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/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 |  | 
|---|
| 18 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 19 | href="../../final-system/common/binutils.xml" | 
|---|
| 20 | xpointer="xpointer(//*[@role='package'])"/> | 
|---|
| 21 |  | 
|---|
| 22 | <sect2 role="installation"> | 
|---|
| 23 | <title>Installation of Cross Binutils</title> | 
|---|
| 24 |  | 
|---|
| 25 | <para os="da">It is important that Binutils be compiled before Glibc and | 
|---|
| 26 | GCC because both Glibc and GCC perform various tests on the available | 
|---|
| 27 | linker and assembler to determine which of their own features to | 
|---|
| 28 | enable.</para> | 
|---|
| 29 |  | 
|---|
| 30 | <!-- Branch update patch area | 
|---|
| 31 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 32 | href="../../final-system/common/binutils.xml" | 
|---|
| 33 | xpointer="xpointer(//*[@os='p1'])"/> | 
|---|
| 34 |  | 
|---|
| 35 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 36 | href="../../final-system/common/binutils.xml" | 
|---|
| 37 | xpointer="xpointer(//*[@os='p2'])"/> | 
|---|
| 38 | --> | 
|---|
| 39 | <para os="s1">Apply the following sed for hosts using Texinfo-5.x:</para> | 
|---|
| 40 |  | 
|---|
| 41 | <screen os="s2"><userinput>sed -i -e 's/@colophon/@@colophon/' \ | 
|---|
| 42 | -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo</userinput></screen> | 
|---|
| 43 |  | 
|---|
| 44 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 45 | href="../../final-system/common/binutils.xml" | 
|---|
| 46 | xpointer="xpointer(//*[@os='g'])"/> | 
|---|
| 47 |  | 
|---|
| 48 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 49 | href="../../final-system/common/binutils.xml" | 
|---|
| 50 | xpointer="xpointer(//*[@os='h'])"/> | 
|---|
| 51 |  | 
|---|
| 52 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" | 
|---|
| 53 | href="../../final-system/common/binutils.xml" | 
|---|
| 54 | xpointer="xpointer(//*[@os='i'])"/> | 
|---|
| 55 |  | 
|---|
| 56 | <screen os="bc"><userinput>AR=ar AS=as ../binutils-&binutils-dir;/configure \ | 
|---|
| 57 | --prefix=/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \ | 
|---|
| 58 | --with-sysroot=${CLFS} --with-lib-path=/tools/lib --disable-nls \ | 
|---|
| 59 | --enable-shared --disable-static --enable-64-bit-bfd --disable-multilib</userinput></screen> | 
|---|
| 60 |  | 
|---|
| 61 | <variablelist os="bd"> | 
|---|
| 62 | <title>The meaning of the new configure options:</title> | 
|---|
| 63 |  | 
|---|
| 64 | <varlistentry os="bd1"> | 
|---|
| 65 | <term><parameter>AR=ar AS=as</parameter></term> | 
|---|
| 66 | <listitem> | 
|---|
| 67 | <para>This prevents Binutils from compiling with ${CLFS_HOST}-ar | 
|---|
| 68 | and ${CLFS_HOST}-as as they are provided by this package and therefore | 
|---|
| 69 | not installed yet.</para> | 
|---|
| 70 | </listitem> | 
|---|
| 71 | </varlistentry> | 
|---|
| 72 |  | 
|---|
| 73 | <varlistentry os="bd2"> | 
|---|
| 74 | <term><parameter>--host=${CLFS_HOST}</parameter></term> | 
|---|
| 75 | <listitem> | 
|---|
| 76 | <para>When used with --target, this creates a cross-architecture | 
|---|
| 77 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para> | 
|---|
| 78 | </listitem> | 
|---|
| 79 | </varlistentry> | 
|---|
| 80 |  | 
|---|
| 81 | <varlistentry os="bd3"> | 
|---|
| 82 | <term><parameter>--target=${CLFS_TARGET}</parameter></term> | 
|---|
| 83 | <listitem> | 
|---|
| 84 | <para>When used with --host, this creates a cross-architecture | 
|---|
| 85 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para> | 
|---|
| 86 | </listitem> | 
|---|
| 87 | </varlistentry> | 
|---|
| 88 |  | 
|---|
| 89 | <varlistentry os="bd4"> | 
|---|
| 90 | <term><parameter>--with-lib-path=/tools/lib</parameter></term> | 
|---|
| 91 | <listitem> | 
|---|
| 92 | <para>This tells the configure script to specify the library | 
|---|
| 93 | search path during the compilation of Binutils, resulting in | 
|---|
| 94 | <filename class="directory">/tools/lib</filename> being passed | 
|---|
| 95 | to the linker. This prevents the linker from searching through | 
|---|
| 96 | library directories on the host.</para> | 
|---|
| 97 | </listitem> | 
|---|
| 98 | </varlistentry> | 
|---|
| 99 |  | 
|---|
| 100 | <varlistentry os="bd5"> | 
|---|
| 101 | <term><parameter>--disable-nls</parameter></term> | 
|---|
| 102 | <listitem> | 
|---|
| 103 | <para>This disables internationalization as i18n is not needed for the | 
|---|
| 104 | cross-compile tools.</para> | 
|---|
| 105 | </listitem> | 
|---|
| 106 | </varlistentry> | 
|---|
| 107 |  | 
|---|
| 108 | <varlistentry os="bd6"> | 
|---|
| 109 | <term><parameter>--disable-multilib</parameter></term> | 
|---|
| 110 | <listitem> | 
|---|
| 111 | <para>This option disables the building of a multilib | 
|---|
| 112 | capable Binutils.</para> | 
|---|
| 113 | </listitem> | 
|---|
| 114 | </varlistentry> | 
|---|
| 115 |  | 
|---|
| 116 | <varlistentry os="bd7"> | 
|---|
| 117 | <term><parameter>--enable-64-bit-bfd</parameter></term> | 
|---|
| 118 | <listitem> | 
|---|
| 119 | <para>This adds 64 bit support to Binutils.</para> | 
|---|
| 120 | </listitem> | 
|---|
| 121 | </varlistentry> | 
|---|
| 122 |  | 
|---|
| 123 | </variablelist> | 
|---|
| 124 |  | 
|---|
| 125 | <para os="be">Compile the package:</para> | 
|---|
| 126 |  | 
|---|
| 127 | <screen os="bf"><userinput>make configure-host | 
|---|
| 128 | make</userinput></screen> | 
|---|
| 129 |  | 
|---|
| 130 | <variablelist os="bg"> | 
|---|
| 131 | <title>The meaning of the make options:</title> | 
|---|
| 132 |  | 
|---|
| 133 | <varlistentry os="bg1"> | 
|---|
| 134 | <term><parameter>configure-host</parameter></term> | 
|---|
| 135 | <listitem> | 
|---|
| 136 | <para>This checks the host environment and makes sure all the | 
|---|
| 137 | necessary tools are available to compile Binutils.</para> | 
|---|
| 138 | </listitem> | 
|---|
| 139 | </varlistentry> | 
|---|
| 140 |  | 
|---|
| 141 | </variablelist> | 
|---|
| 142 |  | 
|---|
| 143 | <para os="bh">Install the package:</para> | 
|---|
| 144 |  | 
|---|
| 145 | <screen os="bi"><userinput>make install</userinput></screen> | 
|---|
| 146 |  | 
|---|
| 147 | <para os="bj">Copy <filename class="headerfile">libiberty.h</filename> to | 
|---|
| 148 | <filename class="directory">/tools/include</filename> directory:</para> | 
|---|
| 149 |  | 
|---|
| 150 | <screen os="bk"><userinput>cp -v ../binutils-&binutils-dir;/include/libiberty.h /tools/include</userinput></screen> | 
|---|
| 151 |  | 
|---|
| 152 | </sect2> | 
|---|
| 153 |  | 
|---|
| 154 | <sect2 role="content"> | 
|---|
| 155 | <title/> | 
|---|
| 156 |  | 
|---|
| 157 | <para>Details on this package are located in <xref | 
|---|
| 158 | linkend="contents-binutils" role="."/></para> | 
|---|
| 159 |  | 
|---|
| 160 | </sect2> | 
|---|
| 161 |  | 
|---|
| 162 | </sect1> | 
|---|