[ad36f39] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[bd48e48] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[ad36f39] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-cross-tools-variables">
|
---|
| 9 | <?dbhtml filename="variables.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Build Variables</title>
|
---|
| 12 |
|
---|
| 13 | <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
|
---|
| 14 |
|
---|
[b220338] | 15 | <para os="a">During the building of the cross-compile tools, you will need to
|
---|
[7926af1] | 16 | set a few variables that will be dependent on your particular needs.
|
---|
[8ffc8f19] | 17 | You will need to select the target triplet for the target architecture,
|
---|
[293bc69] | 18 | the CPU architecture, the CPU floating point hardware
|
---|
[b220338] | 19 | availability, and (if available) the type of floating point hardware. If you
|
---|
| 20 | do not know what values can be chosen for each of these, you can use the
|
---|
| 21 | tables at the bottom of this page as a reference.</para>
|
---|
| 22 |
|
---|
[8ffc8f19] | 23 | <para os="a1">If your processor is an ARM9, good choices include: triplet of
|
---|
[a5cbaf25] | 24 | armv5l-unknown-linux-uclibeabi, ARM arch of armv5t, and float of soft. ARM9
|
---|
| 25 | processors do not usually have hardware floating point abilities. If your
|
---|
| 26 | processor is a Cortex-A series, which often have hardware floating point
|
---|
| 27 | capability, good choices include: triplet of
|
---|
[75a0379] | 28 | armv7a-unknown-linux-musleabi, ARM arch of armv7-a, float of hard, and fpu
|
---|
[a5cbaf25] | 29 | of vfpv3-d16.</para>
|
---|
[c31ae75] | 30 |
|
---|
| 31 | <para os="a2">First, set the host and target triplets:</para>
|
---|
[ad36f39] | 32 |
|
---|
| 33 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 34 | href="../common/variables.xml"
|
---|
[5b4806a] | 35 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
[ad36f39] | 36 |
|
---|
[293bc69] | 37 | <para os="c">Now set the architecture of the CPU:</para>
|
---|
[ad36f39] | 38 |
|
---|
[8ffc8f19] | 39 | <screen os="d"><userinput>export CLFS_ARCH=arm</userinput></screen>
|
---|
[6533111] | 40 |
|
---|
[293bc69] | 41 | <para os="e">Choose the ARM architecture (see table below):</para>
|
---|
[b220338] | 42 |
|
---|
[293bc69] | 43 | <screen os="f"><userinput>export CLFS_ARM_ARCH="<replaceable>[architecture]</replaceable>"</userinput></screen>
|
---|
[b220338] | 44 |
|
---|
[a5cbaf25] | 45 | <para os="f1">If your target CPU has hardware floating point support (not all
|
---|
| 46 | ARM CPUs do), then set the following CLFS_FLOAT variable to either "hard" or
|
---|
| 47 | "softfp". Use "softfp" if you need to integrate binaries compiled with
|
---|
| 48 | "soft". Use "hard" if you don't. If your target CPU does not have hard
|
---|
| 49 | floating point support, set the following CLFS_FLOAT vairable to
|
---|
| 50 | "soft".</para>
|
---|
[b220338] | 51 |
|
---|
| 52 | <screen os="f2"><userinput>export CLFS_FLOAT="<replaceable>[hard, softfp, or soft]"</replaceable></userinput></screen>
|
---|
| 53 |
|
---|
| 54 | <para os="f3">If you chose either "hard" or "softfp" for CLFS_FLOAT, you now
|
---|
| 55 | need to set which floating point hardware is actually included (see table below)
|
---|
| 56 | with your ARM CPU:</para>
|
---|
| 57 |
|
---|
| 58 | <screen os="f4"><userinput>export CLFS_FPU="<replaceable>[fpu version]</replaceable>"</userinput></screen>
|
---|
| 59 |
|
---|
[5b4806a] | 60 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 61 | href="../common/variables.xml"
|
---|
[0dad5b9] | 62 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
[6533111] | 63 |
|
---|
[b220338] | 64 | <screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 65 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
| 66 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 67 | echo export CLFS_ARM_ARCH=\""${CLFS_ARM_ARCH}\"" >> ~/.bashrc
|
---|
| 68 | echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" >> ~/.bashrc
|
---|
| 69 | echo export CLFS_FPU=\""${CLFS_FPU}\"" >> ~/.bashrc</userinput></screen>
|
---|
[ad36f39] | 70 |
|
---|
[0dad5b9] | 71 | <table os="i">
|
---|
[b220338] | 72 | <title>Example Processor Type, ABI, and Target Triplets</title>
|
---|
[d44503cc] | 73 | <?dbfo table-width="7in" ?>
|
---|
[3ca2208] | 74 |
|
---|
[8ffc8f19] | 75 | <tgroup cols="3">
|
---|
[3ca2208] | 76 |
|
---|
| 77 | <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
|
---|
[8ffc8f19] | 78 | <colspec colnum="2" colwidth="1in" colname="ABI"/>
|
---|
| 79 | <colspec colnum="3" colwidth="2.5in" colname="Triplet"/>
|
---|
[3ca2208] | 80 |
|
---|
[ad36f39] | 81 | <thead>
|
---|
| 82 | <row>
|
---|
| 83 | <entry>Processor</entry>
|
---|
[d44503cc] | 84 | <entry>ABI</entry>
|
---|
[ad36f39] | 85 | <entry>Target Triplet</entry>
|
---|
| 86 | </row>
|
---|
| 87 | </thead>
|
---|
[3ca2208] | 88 |
|
---|
[ad36f39] | 89 | <tbody>
|
---|
[ff29c76] | 90 | <row>
|
---|
| 91 | <entry>Generic arm, version 5</entry>
|
---|
| 92 | <entry>EABI</entry>
|
---|
[75a0379] | 93 | <entry>armv5l-unknown-linux-musleabi</entry>
|
---|
[ad36f39] | 94 | </row>
|
---|
[d44503cc] | 95 | <row>
|
---|
| 96 | <entry>Generic arm</entry>
|
---|
| 97 | <entry>EABI</entry>
|
---|
[75a0379] | 98 | <entry>arm-unknown-linux-musleabi</entry>
|
---|
[d44503cc] | 99 | </row>
|
---|
[ff29c76] | 100 | <row>
|
---|
| 101 | <entry>Generic arm, version 7-a </entry>
|
---|
| 102 | <entry>EABI</entry>
|
---|
[75a0379] | 103 | <entry>armv7a-unknown-linux-musleabi</entry>
|
---|
[ff29c76] | 104 | </row>
|
---|
[ad36f39] | 105 | </tbody>
|
---|
[3ca2208] | 106 |
|
---|
[ad36f39] | 107 | </tgroup>
|
---|
[3ca2208] | 108 |
|
---|
[ad36f39] | 109 | </table>
|
---|
| 110 |
|
---|
[b220338] | 111 | <table os="j">
|
---|
| 112 | <title>ARM Archiecture Choices</title>
|
---|
| 113 | <?dbfo table-width="4in" ?>
|
---|
| 114 |
|
---|
[5c58544] | 115 | <tgroup cols="4">
|
---|
[b220338] | 116 |
|
---|
| 117 | <colspec colnum="1" colwidth="1in" colname="Arch Choice"/>
|
---|
| 118 | <colspec colnum="2" colwidth="1in" colname="Arch Choice"/>
|
---|
| 119 | <colspec colnum="3" colwidth="1in" colname="Arch Choice"/>
|
---|
| 120 | <colspec colnum="4" colwidth="1in" colname="Arch Choice"/>
|
---|
| 121 |
|
---|
| 122 | <tbody>
|
---|
| 123 | <row>
|
---|
| 124 | <entry>armv4t</entry>
|
---|
| 125 | <entry>armv5</entry>
|
---|
| 126 | <entry>armv5t</entry>
|
---|
[90309a2] | 127 | <entry>armv5te</entry>
|
---|
[b220338] | 128 | </row>
|
---|
| 129 | <row>
|
---|
| 130 | <entry>armv6</entry>
|
---|
| 131 | <entry>armv6j</entry>
|
---|
| 132 | <entry>armv6t2</entry>
|
---|
[90309a2] | 133 | <entry>armv6z</entry>
|
---|
[b220338] | 134 | </row>
|
---|
| 135 | <row>
|
---|
| 136 | <entry>armv6zk</entry>
|
---|
| 137 | <entry>armv6-m</entry>
|
---|
| 138 | <entry>armv7</entry>
|
---|
[90309a2] | 139 | <entry>armv7-a</entry>
|
---|
[b220338] | 140 | </row>
|
---|
| 141 | <row>
|
---|
| 142 | <entry>armv7-r</entry>
|
---|
| 143 | <entry>armv7-m</entry>
|
---|
| 144 | </row>
|
---|
| 145 | </tbody>
|
---|
| 146 | </tgroup>
|
---|
| 147 | </table>
|
---|
| 148 |
|
---|
| 149 | <table os="j">
|
---|
| 150 | <title>ARM Hard Floating Point Versions</title>
|
---|
| 151 | <?dbfo table-width="4in" ?>
|
---|
| 152 |
|
---|
[5c58544] | 153 | <tgroup cols="4">
|
---|
[b220338] | 154 |
|
---|
| 155 | <colspec colnum="1" colwidth="1in" colname="FPU Choice"/>
|
---|
| 156 | <colspec colnum="2" colwidth="1in" colname="FPU Choice"/>
|
---|
| 157 | <colspec colnum="3" colwidth="1in" colname="FPU Choice"/>
|
---|
| 158 | <colspec colnum="4" colwidth="1in" colname="FPU Choice"/>
|
---|
| 159 |
|
---|
| 160 | <tbody>
|
---|
| 161 | <row>
|
---|
| 162 | <entry>fpa</entry>
|
---|
| 163 | <entry>fpe2</entry>
|
---|
| 164 | <entry>fpe3</entry>
|
---|
| 165 | <entry>maverick</entry>
|
---|
| 166 | </row>
|
---|
| 167 | <row>
|
---|
| 168 | <entry>vfp</entry>
|
---|
| 169 | <entry>vfpv3</entry>
|
---|
| 170 | <entry>vfpv3-fp16</entry>
|
---|
| 171 | <entry>vfpv3-d16</entry>
|
---|
| 172 | </row>
|
---|
| 173 | <row>
|
---|
| 174 | <entry>vfpv3-d16-fp16</entry>
|
---|
| 175 | <entry>vfpv3xd</entry>
|
---|
| 176 | <entry>vfpv3xd-fp16</entry>
|
---|
| 177 | <entry>neon</entry>
|
---|
| 178 | </row>
|
---|
| 179 | <row>
|
---|
| 180 | <entry>neon-fp16</entry>
|
---|
| 181 | <entry>vfpv4</entry>
|
---|
| 182 | <entry>vfpv4-d16</entry>
|
---|
| 183 | <entry>fpv4-sp-d16</entry>
|
---|
| 184 | </row>
|
---|
| 185 | <row>
|
---|
| 186 | <entry>neon-vfpv4</entry>
|
---|
| 187 | </row>
|
---|
| 188 | </tbody>
|
---|
| 189 | </tgroup>
|
---|
| 190 | </table>
|
---|
| 191 |
|
---|
[ad36f39] | 192 | </sect1>
|
---|