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

Last change on this file since f9f2236 was f96a570, checked in by Andrew Bradford <andrew@…>, 11 years ago

x86/variables: Set arch to x86

i*86 isn't a valid arch in the kernel, x86 is.

  • Property mode set to 100644
File size: 3.1 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,
[5470f08]19 you can use the table 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
[0dad5b9]26 <table os="i">
[a9e389d]27 <title>Processor Type and Target Triplets</title>
[6b723ad]28 <?dbfo table-width="7.5in" ?>
[3ca2208]29
[5c58544]30 <tgroup cols="4">
[3ca2208]31
32 <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
33 <colspec colnum="2" colwidth="2in" colname="Triplet"/>
[6b723ad]34 <colspec colnum="3" colwidth="0.5in" colname="CPU Type"/>
35 <colspec colnum="4" colwidth="2.5in" colname="Note"/>
[3ca2208]36
[a9e389d]37 <thead>
38 <row>
39 <entry>Processor</entry>
40 <entry>Target Triplet</entry>
[6b723ad]41 <entry>CPU Type</entry>
42 <entry>Note</entry>
[a9e389d]43 </row>
44 </thead>
[3ca2208]45
[a9e389d]46 <tbody>
47 <row>
48 <entry>486 Compatibles</entry>
[7f1f997]49 <entry>i486-linux-musl</entry>
[6b723ad]50 <entry>i486</entry>
51 <entry>Intel's i486</entry>
[a9e389d]52 </row>
53 <row>
54 <entry>Pentium, K6, 586 Compatibles</entry>
[7f1f997]55 <entry>i586-linux-musl</entry>
[6b723ad]56 <entry>i586</entry>
57 <entry>Intel Pentium without MMX</entry>
[a9e389d]58 </row>
59 <row>
60 <entry>Pentium II, Pentium III, Pentium 4</entry>
[7f1f997]61 <entry>i686-linux-musl</entry>
[6b723ad]62 <entry>i686</entry>
63 <entry>PentiumPro instruction set</entry>
[a9e389d]64 </row>
65 <row>
[6b723ad]66 <entry>Athlon</entry>
[7f1f997]67 <entry>i686-linux-musl</entry>
[6b723ad]68 <entry>athlon</entry>
69 <entry>AMD 32 bit Athlon</entry>
[a9e389d]70 </row>
[128e9a4]71 <row>
[6b723ad]72 <entry>Opteron</entry>
[7f1f997]73 <entry>x86_64-linux-musl</entry>
[6b723ad]74 <entry>k8</entry>
75 <entry>AMD K8 processors with x86-64</entry>
[128e9a4]76 </row>
[a9e389d]77 </tbody>
[3ca2208]78
[a9e389d]79 </tgroup>
[3ca2208]80
[a9e389d]81 </table>
82
[f96a570]83 <para os="c">Now set the architecture of the CPU:</para>
[5470f08]84
[f96a570]85<screen os="d"><userinput>export CLFS_ARCH="x86"</userinput></screen>
[5470f08]86
87 <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
88 case you have to exit and restart building later:</para>
89
90<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
91echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
92echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
93echo export CLFS_CPU=\""${CLFS_CPU}\"" &gt;&gt; ~/.bashrc</userinput></screen>
94
[a9e389d]95</sect1>
Note: See TracBrowser for help on using the repository browser.