[02095ae] | 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 | |
---|
| 18 | <xi:include xmlns:xi="http://www.w3.org/2003/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 the first package compiled |
---|
| 26 | 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 | |
---|
[7126617] | 30 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 31 | href="../../final-system/common/binutils.xml" |
---|
| 32 | xpointer="xpointer(//*[@os='p1'])"/> |
---|
[02095ae] | 33 | |
---|
[7126617] | 34 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 35 | href="../../final-system/common/binutils.xml" |
---|
| 36 | xpointer="xpointer(//*[@os='p2'])"/> |
---|
[02095ae] | 37 | |
---|
| 38 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 39 | href="../../final-system/common/binutils.xml" |
---|
[1f0a9c9] | 40 | xpointer="xpointer(//*[@os='a'])"/> |
---|
[02095ae] | 41 | |
---|
| 42 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 43 | href="../../final-system/common/binutils.xml" |
---|
[1f0a9c9] | 44 | xpointer="xpointer(//*[@os='b'])"/> |
---|
[02095ae] | 45 | |
---|
| 46 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 47 | href="../../final-system/common/binutils.xml" |
---|
[1f0a9c9] | 48 | xpointer="xpointer(//*[@os='c'])"/> |
---|
[02095ae] | 49 | |
---|
[586feb7] | 50 | <screen os="bc"><userinput>../binutils-&binutils-version;/configure --prefix=${CLFS}/cross-tools \ |
---|
| 51 | --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=${CLFS} \ |
---|
[02095ae] | 52 | --disable-nls --enable-shared --disable-multilib</userinput></screen> |
---|
| 53 | |
---|
| 54 | <variablelist os="bd"> |
---|
| 55 | <title>The meaning of the configure options:</title> |
---|
| 56 | |
---|
| 57 | <varlistentry os="bd1"> |
---|
[586feb7] | 58 | <term><parameter>--prefix=${CLFS}/cross-tools</parameter></term> |
---|
[02095ae] | 59 | <listitem> |
---|
| 60 | <para>This tells the configure script to prepare to install the |
---|
[586feb7] | 61 | package in the <filename class="directory">${CLFS}/cross-tools</filename> |
---|
[02095ae] | 62 | directory.</para> |
---|
| 63 | </listitem> |
---|
| 64 | </varlistentry> |
---|
| 65 | |
---|
| 66 | <varlistentry os="bd2"> |
---|
[586feb7] | 67 | <term><parameter>--host=${CLFS_HOST}</parameter></term> |
---|
[02095ae] | 68 | <listitem> |
---|
| 69 | <para>When used with --target, this creates a cross-architecture |
---|
[586feb7] | 70 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST).</para> |
---|
[02095ae] | 71 | </listitem> |
---|
| 72 | </varlistentry> |
---|
| 73 | |
---|
| 74 | <varlistentry os="bd3"> |
---|
[586feb7] | 75 | <term><parameter>--target=${CLFS_TARGET}</parameter></term> |
---|
[02095ae] | 76 | <listitem> |
---|
| 77 | <para>When used with --host, this creates a cross-architecture |
---|
[586feb7] | 78 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST).</para> |
---|
[02095ae] | 79 | </listitem> |
---|
| 80 | </varlistentry> |
---|
| 81 | |
---|
| 82 | <varlistentry os="bd4"> |
---|
[586feb7] | 83 | <term><parameter>--with-sysroot=${CLFS}</parameter></term> |
---|
[02095ae] | 84 | <listitem> |
---|
[586feb7] | 85 | <para>This tells configure that ${CLFS} is going to be the root |
---|
| 86 | of our system. It will now use the specified sysroot, ${CLFS} as |
---|
[02095ae] | 87 | a prefix of the default search paths.</para> |
---|
| 88 | </listitem> |
---|
| 89 | </varlistentry> |
---|
| 90 | |
---|
| 91 | <varlistentry os="bd5"> |
---|
| 92 | <term><parameter>--disable-nls</parameter></term> |
---|
| 93 | <listitem> |
---|
| 94 | <para>This disables internationalization as i18n is not needed for the |
---|
| 95 | cross-compile tools.</para> |
---|
| 96 | </listitem> |
---|
| 97 | </varlistentry> |
---|
| 98 | |
---|
| 99 | <varlistentry os="bd6"> |
---|
| 100 | <term><parameter>--enable-shared</parameter></term> |
---|
| 101 | <listitem> |
---|
| 102 | <para>Enable the creation of the shared libraries.</para> |
---|
| 103 | </listitem> |
---|
| 104 | </varlistentry> |
---|
| 105 | |
---|
| 106 | <varlistentry os="bd7"> |
---|
| 107 | <term><parameter>--disable-multilib</parameter></term> |
---|
| 108 | <listitem> |
---|
| 109 | <para>This option disables the building of a multilib |
---|
| 110 | capable binutils.</para> |
---|
| 111 | </listitem> |
---|
| 112 | </varlistentry> |
---|
| 113 | |
---|
| 114 | </variablelist> |
---|
| 115 | |
---|
| 116 | <para os="be">Compile the package:</para> |
---|
| 117 | |
---|
| 118 | <screen os="bf"><userinput>make configure-host |
---|
| 119 | make</userinput></screen> |
---|
| 120 | |
---|
| 121 | <variablelist os="bg"> |
---|
| 122 | <title>The meaning of the make options:</title> |
---|
| 123 | |
---|
| 124 | <varlistentry os="bg1"> |
---|
| 125 | <term><parameter>configure-host</parameter></term> |
---|
| 126 | <listitem> |
---|
| 127 | <para>This checks the host environment and makes sure all the |
---|
| 128 | necessary tools are available to compile binutils.</para> |
---|
| 129 | </listitem> |
---|
| 130 | </varlistentry> |
---|
| 131 | |
---|
| 132 | </variablelist> |
---|
| 133 | |
---|
| 134 | <para os="bh">Install the package:</para> |
---|
| 135 | |
---|
| 136 | <screen os="bi"><userinput>make install</userinput></screen> |
---|
| 137 | |
---|
| 138 | <para os="bj">Copy the <filename class="headerfile">libiberty.h</filename> file to |
---|
[586feb7] | 139 | <filename class="directory">${CLFS}/usr/include</filename> directory:</para> |
---|
[02095ae] | 140 | |
---|
[586feb7] | 141 | <screen os="bk"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h ${CLFS}/usr/include</userinput></screen> |
---|
[02095ae] | 142 | |
---|
| 143 | </sect2> |
---|
| 144 | |
---|
| 145 | <sect2 role="content"> |
---|
| 146 | <title/> |
---|
| 147 | |
---|
| 148 | <para>Details on this package are located in <xref |
---|
| 149 | linkend="contents-binutils" role="."/></para> |
---|
| 150 | |
---|
| 151 | </sect2> |
---|
| 152 | |
---|
| 153 | </sect1> |
---|