[8672967] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/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 <envar>HOST</envar> machine.
|
---|
| 18 | You will need to set the <envar>CHOST</envar> triplet to match your
|
---|
| 19 | particular needs. To set this information you can issue the following
|
---|
| 20 | command:</para>
|
---|
| 21 |
|
---|
[bda4ad3] | 22 | <screen os="b"><userinput>export CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"</userinput></screen>
|
---|
[8672967] | 23 |
|
---|
| 24 | <para os="c">Now you will need to set the target triplet for the target
|
---|
| 25 | architecture. You can do this by running the same command as above, just
|
---|
| 26 | running it on the target machine. If you can't run the command on the
|
---|
| 27 | target machine, you can use the table at the bottom of this page. Set
|
---|
| 28 | the command using the method listed below:</para>
|
---|
| 29 |
|
---|
[07114c98] | 30 | <screen os="d"><userinput>export CLFS_TARGET="{target triplet}"</userinput></screen>
|
---|
[8672967] | 31 |
|
---|
| 32 | <bridgehead renderas="sect4">Copy settings to Environment</bridgehead>
|
---|
| 33 |
|
---|
| 34 | <para os="e">Now we will add these to <filename>~/.bashrc</filename>, just in
|
---|
| 35 | case you have to exit and restart building later:</para>
|
---|
| 36 |
|
---|
[07114c98] | 37 | <screen os="f"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 38 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc</userinput></screen>
|
---|
[8672967] | 39 |
|
---|
| 40 | <table os="g">
|
---|
| 41 | <title>Processor Type and Target Triplets</title>
|
---|
| 42 | <tgroup cols="2" align="center">
|
---|
| 43 | <colspec colname="Processor"/>
|
---|
| 44 | <colspec colname="Triplet"/>
|
---|
| 45 | <thead>
|
---|
| 46 | <row>
|
---|
| 47 | <entry>Processor</entry>
|
---|
| 48 | <entry>Target Triplet</entry>
|
---|
| 49 | </row>
|
---|
| 50 | </thead>
|
---|
| 51 | <tbody>
|
---|
| 52 | <row>
|
---|
| 53 | <entry>486 Compatibles</entry>
|
---|
| 54 | <entry>i486-pc-linux-gnu</entry>
|
---|
| 55 | </row>
|
---|
| 56 | <row>
|
---|
| 57 | <entry>Pentium, K6, 586 Compatibles</entry>
|
---|
| 58 | <entry>i586-pc-linux-gnu</entry>
|
---|
| 59 | </row>
|
---|
| 60 | <row>
|
---|
| 61 | <entry>Pentium II, Pentium III, Pentium 4</entry>
|
---|
| 62 | <entry>i686-pc-linux-gnu</entry>
|
---|
| 63 | </row>
|
---|
| 64 | <row>
|
---|
| 65 | <entry>Athlon, Duron</entry>
|
---|
| 66 | <entry>i686-pc-linux-gnu</entry>
|
---|
| 67 | </row>
|
---|
| 68 | </tbody>
|
---|
| 69 | </tgroup>
|
---|
| 70 | </table>
|
---|
| 71 |
|
---|
| 72 | </sect1>
|
---|