source: clfs-embedded/BOOK/cross-tools/x86/variables.xml@ 293bc69

Last change on this file since 293bc69 was 8ffc8f19, checked in by Andrew Bradford <andrew@…>, 12 years ago

variables: Make ARM & x86 always little endian

99% of the time, this is correct.

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