[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
|
---|
[5470f08] | 21 | tables as a reference.</para>
|
---|
[b220338] | 22 |
|
---|
[8ffc8f19] | 23 | <para os="a1">If your processor is an ARM9, good choices include: triplet of
|
---|
[7f1f997] | 24 | armv5l-linux-uclibeabi, ARM arch of armv5t, and float of soft. ARM9
|
---|
[a5cbaf25] | 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
|
---|
[7f1f997] | 28 | armv7a-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 |
|
---|
[0dad5b9] | 37 | <table os="i">
|
---|
[b220338] | 38 | <title>Example Processor Type, ABI, and Target Triplets</title>
|
---|
[d44503cc] | 39 | <?dbfo table-width="7in" ?>
|
---|
[3ca2208] | 40 |
|
---|
[8ffc8f19] | 41 | <tgroup cols="3">
|
---|
[3ca2208] | 42 |
|
---|
| 43 | <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
|
---|
[8ffc8f19] | 44 | <colspec colnum="2" colwidth="1in" colname="ABI"/>
|
---|
| 45 | <colspec colnum="3" colwidth="2.5in" colname="Triplet"/>
|
---|
[3ca2208] | 46 |
|
---|
[ad36f39] | 47 | <thead>
|
---|
| 48 | <row>
|
---|
| 49 | <entry>Processor</entry>
|
---|
[d44503cc] | 50 | <entry>ABI</entry>
|
---|
[ad36f39] | 51 | <entry>Target Triplet</entry>
|
---|
| 52 | </row>
|
---|
| 53 | </thead>
|
---|
[3ca2208] | 54 |
|
---|
[ad36f39] | 55 | <tbody>
|
---|
[ff29c76] | 56 | <row>
|
---|
| 57 | <entry>Generic arm, version 5</entry>
|
---|
| 58 | <entry>EABI</entry>
|
---|
[7f1f997] | 59 | <entry>armv5l-linux-musleabi</entry>
|
---|
[ad36f39] | 60 | </row>
|
---|
[d44503cc] | 61 | <row>
|
---|
| 62 | <entry>Generic arm</entry>
|
---|
| 63 | <entry>EABI</entry>
|
---|
[7f1f997] | 64 | <entry>arm-linux-musleabi</entry>
|
---|
[d44503cc] | 65 | </row>
|
---|
[ff29c76] | 66 | <row>
|
---|
| 67 | <entry>Generic arm, version 7-a </entry>
|
---|
| 68 | <entry>EABI</entry>
|
---|
[7f1f997] | 69 | <entry>armv7a-linux-musleabi</entry>
|
---|
[ff29c76] | 70 | </row>
|
---|
[ad36f39] | 71 | </tbody>
|
---|
[3ca2208] | 72 |
|
---|
[ad36f39] | 73 | </tgroup>
|
---|
[3ca2208] | 74 |
|
---|
[ad36f39] | 75 | </table>
|
---|
| 76 |
|
---|
[5470f08] | 77 | <para os="c">Now set the architecture of the CPU:</para>
|
---|
| 78 |
|
---|
| 79 | <screen os="d"><userinput>export CLFS_ARCH=arm</userinput></screen>
|
---|
| 80 |
|
---|
| 81 | <para os="e">Choose the ARM architecture (see table below):</para>
|
---|
| 82 |
|
---|
| 83 | <screen os="f"><userinput>export CLFS_ARM_ARCH="<replaceable>[architecture]</replaceable>"</userinput></screen>
|
---|
| 84 |
|
---|
[b220338] | 85 | <table os="j">
|
---|
| 86 | <title>ARM Archiecture Choices</title>
|
---|
| 87 | <?dbfo table-width="4in" ?>
|
---|
| 88 |
|
---|
[5c58544] | 89 | <tgroup cols="4">
|
---|
[b220338] | 90 |
|
---|
| 91 | <colspec colnum="1" colwidth="1in" colname="Arch Choice"/>
|
---|
| 92 | <colspec colnum="2" colwidth="1in" colname="Arch Choice"/>
|
---|
| 93 | <colspec colnum="3" colwidth="1in" colname="Arch Choice"/>
|
---|
| 94 | <colspec colnum="4" colwidth="1in" colname="Arch Choice"/>
|
---|
| 95 |
|
---|
| 96 | <tbody>
|
---|
| 97 | <row>
|
---|
| 98 | <entry>armv4t</entry>
|
---|
| 99 | <entry>armv5</entry>
|
---|
| 100 | <entry>armv5t</entry>
|
---|
[90309a2] | 101 | <entry>armv5te</entry>
|
---|
[b220338] | 102 | </row>
|
---|
| 103 | <row>
|
---|
| 104 | <entry>armv6</entry>
|
---|
| 105 | <entry>armv6j</entry>
|
---|
| 106 | <entry>armv6t2</entry>
|
---|
[90309a2] | 107 | <entry>armv6z</entry>
|
---|
[b220338] | 108 | </row>
|
---|
| 109 | <row>
|
---|
| 110 | <entry>armv6zk</entry>
|
---|
| 111 | <entry>armv6-m</entry>
|
---|
| 112 | <entry>armv7</entry>
|
---|
[90309a2] | 113 | <entry>armv7-a</entry>
|
---|
[b220338] | 114 | </row>
|
---|
| 115 | <row>
|
---|
| 116 | <entry>armv7-r</entry>
|
---|
| 117 | <entry>armv7-m</entry>
|
---|
| 118 | </row>
|
---|
| 119 | </tbody>
|
---|
| 120 | </tgroup>
|
---|
| 121 | </table>
|
---|
| 122 |
|
---|
[5470f08] | 123 | <para os="f1">If your target CPU has hardware floating point support (not all
|
---|
| 124 | ARM CPUs do), then set the following CLFS_FLOAT variable to either "hard" or
|
---|
| 125 | "softfp". Use "softfp" if you need to integrate binaries compiled with
|
---|
| 126 | "soft". Use "hard" if you don't. If your target CPU does not have hard
|
---|
| 127 | floating point support, set the following CLFS_FLOAT vairable to
|
---|
| 128 | "soft".</para>
|
---|
| 129 |
|
---|
| 130 | <screen os="f2"><userinput>export CLFS_FLOAT="<replaceable>[hard, softfp, or soft]"</replaceable></userinput></screen>
|
---|
| 131 |
|
---|
| 132 | <para os="f3">If you chose either "hard" or "softfp" for CLFS_FLOAT, you now
|
---|
| 133 | need to set which floating point hardware is actually included (see table below)
|
---|
| 134 | with your ARM CPU:</para>
|
---|
| 135 |
|
---|
| 136 | <screen os="f4"><userinput>export CLFS_FPU="<replaceable>[fpu version]</replaceable>"</userinput></screen>
|
---|
| 137 |
|
---|
[b220338] | 138 | <table os="j">
|
---|
| 139 | <title>ARM Hard Floating Point Versions</title>
|
---|
| 140 | <?dbfo table-width="4in" ?>
|
---|
| 141 |
|
---|
[5c58544] | 142 | <tgroup cols="4">
|
---|
[b220338] | 143 |
|
---|
| 144 | <colspec colnum="1" colwidth="1in" colname="FPU Choice"/>
|
---|
| 145 | <colspec colnum="2" colwidth="1in" colname="FPU Choice"/>
|
---|
| 146 | <colspec colnum="3" colwidth="1in" colname="FPU Choice"/>
|
---|
| 147 | <colspec colnum="4" colwidth="1in" colname="FPU Choice"/>
|
---|
| 148 |
|
---|
| 149 | <tbody>
|
---|
| 150 | <row>
|
---|
| 151 | <entry>fpa</entry>
|
---|
| 152 | <entry>fpe2</entry>
|
---|
| 153 | <entry>fpe3</entry>
|
---|
| 154 | <entry>maverick</entry>
|
---|
| 155 | </row>
|
---|
| 156 | <row>
|
---|
| 157 | <entry>vfp</entry>
|
---|
| 158 | <entry>vfpv3</entry>
|
---|
| 159 | <entry>vfpv3-fp16</entry>
|
---|
| 160 | <entry>vfpv3-d16</entry>
|
---|
| 161 | </row>
|
---|
| 162 | <row>
|
---|
| 163 | <entry>vfpv3-d16-fp16</entry>
|
---|
| 164 | <entry>vfpv3xd</entry>
|
---|
| 165 | <entry>vfpv3xd-fp16</entry>
|
---|
| 166 | <entry>neon</entry>
|
---|
| 167 | </row>
|
---|
| 168 | <row>
|
---|
| 169 | <entry>neon-fp16</entry>
|
---|
| 170 | <entry>vfpv4</entry>
|
---|
| 171 | <entry>vfpv4-d16</entry>
|
---|
| 172 | <entry>fpv4-sp-d16</entry>
|
---|
| 173 | </row>
|
---|
| 174 | <row>
|
---|
| 175 | <entry>neon-vfpv4</entry>
|
---|
| 176 | </row>
|
---|
| 177 | </tbody>
|
---|
| 178 | </tgroup>
|
---|
| 179 | </table>
|
---|
| 180 |
|
---|
[5470f08] | 181 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 182 | href="../common/variables.xml"
|
---|
| 183 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 184 |
|
---|
| 185 | <screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 186 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
| 187 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 188 | echo export CLFS_ARM_ARCH=\""${CLFS_ARM_ARCH}\"" >> ~/.bashrc
|
---|
| 189 | echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" >> ~/.bashrc
|
---|
| 190 | echo export CLFS_FPU=\""${CLFS_FPU}\"" >> ~/.bashrc</userinput></screen>
|
---|
| 191 |
|
---|
[ad36f39] | 192 | </sect1>
|
---|