source: BOOK/cross-tools/x86/variables.xml@ 42546b79

Last change on this file since 42546b79 was 67300de, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Create a clfs-1.1 branch in preperation for a RC.

  • Property mode set to 100644
File size: 2.9 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 The first variable will be the triplet of the host machine, which will be
18 put into the <envar>CLFS_HOST</envar> variable. To account for the
19 possibility that the host and target are the same arch, as cross-compiling
20 won't work when host and target are the same, part of the triplet needs to
21 be changed slightly to add "cross". Set <envar>CLFS_HOST</envar> using the
22 following command:</para>
23
24<screen os="b"><userinput>export CLFS_HOST="$(echo $MACHTYPE | \
25 sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"</userinput></screen>
26
27 <para os="c">Now you will need to set the triplet for the target
28 architecture. Set the target variable using the following command:</para>
29
30<screen os="d"><userinput>export CLFS_TARGET="[target triplet]"</userinput></screen>
31
32 <para os="t1">Replace [target triplet] with the appropriate machine triplet
33 using the table at the bottom of the page.</para>
34
35 <bridgehead renderas="sect4">Copy settings to the Environment</bridgehead>
36
37 <para os="e">Now add these to <filename>~/.bashrc</filename>, just in
38 case you have to exit and restart building later:</para>
39
40<screen os="f"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
41echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc</userinput></screen>
42
43 <table os="g">
44 <title>Processor Type and Target Triplets</title>
45 <?dbfo table-width="5in" ?>
46
47 <tgroup cols="2">
48
49 <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
50 <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
51
52 <thead>
53 <row>
54 <entry>Processor</entry>
55 <entry>Target Triplet</entry>
56 </row>
57 </thead>
58
59 <tbody>
60 <row>
61 <entry>386 Compatibles</entry>
62 <entry>Not Supported By Glibc</entry>
63 </row>
64 <row>
65 <entry>486 Compatibles</entry>
66 <entry>i486-pc-linux-gnu</entry>
67 </row>
68 <row>
69 <entry>Pentium, K6, 586 Compatibles</entry>
70 <entry>i586-pc-linux-gnu</entry>
71 </row>
72 <row>
73 <entry>Pentium II, Pentium III, Pentium 4</entry>
74 <entry>i686-pc-linux-gnu</entry>
75 </row>
76 <row>
77 <entry>Athlon, Duron</entry>
78 <entry>i686-pc-linux-gnu</entry>
79 </row>
80 </tbody>
81
82 </tgroup>
83
84 </table>
85
86</sect1>
Note: See TracBrowser for help on using the repository browser.