source: clfs-embedded/BOOK/cross-tools/x86/variables.xml @ 6b723ad

Last change on this file since 6b723ad was 6b723ad, checked in by Andrew Bradford <bradfa@…>, 12 years ago

Removed x86 ABI, added CLFS_CPU variable

Removed the x86 ABI page from being rendered in the book as it isn't
needed. We weren't actually pick an ABI for x86, we were picking if
we wanted 32 or 64 bit versions of x86. This would be better handled
if we were to pick which CPU architecture GCC should be compiled for
and then have a GCC that only outputs code for said 32 or 64 bit CPU.

Added the CLFS_CPU variable so that CPU architectures can be picked
from the list at:
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
We'll eventually use this CLFS_CPU choice with GCC's --with-arch=
configure line to generate a GCC just for our CPU.

  • Property mode set to 100644
File size: 3.4 KB
Line 
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-variables">
9  <?dbhtml filename="variables.html"?>
10
11  <title>Build Variables</title>
12
13  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
14
15  <para os="a">During the building of the cross-compile tools you will need to
16  set a few variables that will be dependent on your particular needs.
17  You will need to set the target triplet for the target architecture, the CPU
18  type, and CPU endianess. If you do not know what triplet or CPU type you want,
19  you can use the table at the bottom of this page as a reference. Set
20  the command using the method listed below:</para>
21
22<screen os="b"><userinput>export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")
23export CLFS_TARGET=<replaceable>[target triplet]</replaceable>
24export CLFS_CPU=<replaceable>[cpu type]</replaceable></userinput></screen>
25
26  <para os="c">Now we will set the architecture and endianess of the CPU based
27  on the target triplet provided above:</para>
28
29<screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')
30export CLFS_ENDIAN=little</userinput></screen>
31
32  <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
33  case you have to exit and restart building later:</para>
34
35<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
36echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
37echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
38echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" &gt;&gt; ~/.bashrc</userinput></screen>
39
40  <table os="i">
41    <title>Processor Type and  Target Triplets</title>
42    <?dbfo table-width="7.5in" ?>
43
44    <tgroup cols="2">
45
46      <colspec colnum="1" colwidth="2.5in"   colname="Processor"/>
47      <colspec colnum="2" colwidth="2in" colname="Triplet"/>
48      <colspec colnum="3" colwidth="0.5in" colname="CPU Type"/>
49      <colspec colnum="4" colwidth="2.5in" colname="Note"/>
50
51      <thead>
52        <row>
53          <entry>Processor</entry>
54          <entry>Target Triplet</entry>
55          <entry>CPU Type</entry>
56          <entry>Note</entry>
57        </row>
58      </thead>
59
60      <tbody>
61        <row>
62          <entry>486 Compatibles</entry>
63          <entry>i486-pc-linux-uclibc</entry>
64          <entry>i486</entry>
65          <entry>Intel's i486</entry>
66        </row>
67        <row>
68          <entry>Pentium, K6, 586 Compatibles</entry>
69          <entry>i586-pc-linux-uclibc</entry>
70          <entry>i586</entry>
71          <entry>Intel Pentium without MMX</entry>
72        </row>
73        <row>
74          <entry>Pentium II, Pentium III, Pentium 4</entry>
75          <entry>i686-pc-linux-uclibc</entry>
76          <entry>i686</entry>
77          <entry>PentiumPro instruction set</entry>
78        </row>
79        <row>
80          <entry>Athlon</entry>
81          <entry>i686-pc-linux-uclibc</entry>
82          <entry>athlon</entry>
83          <entry>AMD 32 bit Athlon</entry>
84        </row>
85        <row>
86          <entry>Opteron</entry>
87          <entry>x86_64-unknown-linux-uclibc</entry>
88          <entry>k8</entry>
89          <entry>AMD K8 processors with x86-64</entry>
90        </row>
91      </tbody>
92
93    </tgroup>
94
95  </table>
96
97</sect1>
Note: See TracBrowser for help on using the repository browser.