source: clfs-embedded/BOOK/cross-tools/arm/variables.xml@ 241f9a9

Last change on this file since 241f9a9 was c5d3ce0, checked in by William Harrington <kb0iic@…>, 11 years ago

The softfp target shouldn't use the triple ending in hf.

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