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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since e124019 was e0592ba, checked in by Jim Gifford <clfs@…>, 15 years ago

Fixed typo in Variables change

  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[8672967]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[8672967]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.
[7030b60]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>
[8672967]23
[f5262133]24<screen os="b"><userinput>export CLFS_HOST="$(echo ${MACHTYPE} | \
[e0592ba]25 sed "s/$(echo ${MACHTYPE} | cut -d- -f2)/cross/")"</userinput></screen>
[8672967]26
[7030b60]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>
[8672967]29
[7030b60]30<screen os="d"><userinput>export CLFS_TARGET="[target triplet]"</userinput></screen>
[8672967]31
[7030b60]32 <para os="t1">Replace [target triplet] with the appropriate machine triplet
33 using the table at the bottom of the page.</para>
[8672967]34
[7030b60]35 <bridgehead renderas="sect4">Copy settings to the Environment</bridgehead>
36
37 <para os="e">Now add these to <filename>~/.bashrc</filename>, just in
[8672967]38 case you have to exit and restart building later:</para>
39
[c63dde1]40<screen os="f"><userinput>cat &gt;&gt; ~/.bashrc &lt;&lt; EOF
41export CLFS_HOST="${CLFS_HOST}"
42export CLFS_TARGET="${CLFS_TARGET}"
43EOF</userinput></screen>
[8672967]44
45 <table os="g">
46 <title>Processor Type and Target Triplets</title>
[d018b81]47 <?dbfo table-width="5in" ?>
48
49 <tgroup cols="2">
50
51 <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
52 <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
53
[8672967]54 <thead>
55 <row>
56 <entry>Processor</entry>
57 <entry>Target Triplet</entry>
58 </row>
59 </thead>
[d018b81]60
[8672967]61 <tbody>
[44426cf]62 <row>
63 <entry>386 Compatibles</entry>
64 <entry>Not Supported By Glibc</entry>
65 </row>
[8672967]66 <row>
67 <entry>486 Compatibles</entry>
[9c8852d]68 <entry>i486-pc-linux-gnu</entry>
[8672967]69 </row>
70 <row>
71 <entry>Pentium, K6, 586 Compatibles</entry>
[9c8852d]72 <entry>i586-pc-linux-gnu</entry>
[8672967]73 </row>
74 <row>
75 <entry>Pentium II, Pentium III, Pentium 4</entry>
[9c8852d]76 <entry>i686-pc-linux-gnu</entry>
[8672967]77 </row>
78 <row>
79 <entry>Athlon, Duron</entry>
[9c8852d]80 <entry>i686-pc-linux-gnu</entry>
[8672967]81 </row>
82 </tbody>
[d018b81]83
[8672967]84 </tgroup>
[d018b81]85
[8672967]86 </table>
87
88</sect1>
Note: See TracBrowser for help on using the repository browser.