[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.
|
---|
[9dc5852] | 17 | You will need to set the target triplet for the target
|
---|
[a9e389d] | 18 | architecture. You can do this by running the same command as above, just
|
---|
| 19 | running it on the target machine. If you can't run the command on the
|
---|
| 20 | target machine, you can use the table at the bottom of this page. Set
|
---|
| 21 | the command using the method listed below:</para>
|
---|
| 22 |
|
---|
[05ce0d3] | 23 | <screen os="b"><userinput>export CLFS_HOST="${MACHTYPE}"
|
---|
| 24 | export CLFS_TARGET="{target triplet}"</userinput></screen>
|
---|
[a9e389d] | 25 |
|
---|
[6533111] | 26 | <para os="c">Now we will setup out default architecture needed we need to build:</para>
|
---|
| 27 |
|
---|
[0dad5b9] | 28 | <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')</userinput></screen>
|
---|
[6533111] | 29 |
|
---|
[0dad5b9] | 30 | <para os="e">Now we will setup out default endian needed we need to build and set the one we don't need:</para>
|
---|
| 31 |
|
---|
| 32 | <screen os="f"><userinput>export CLFS_ENDIAN=LITTLE
|
---|
| 33 | export CLFS_NOT_ENDIAN=BIG</userinput></screen>
|
---|
| 34 |
|
---|
| 35 | <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
|
---|
[a9e389d] | 36 | case you have to exit and restart building later:</para>
|
---|
| 37 |
|
---|
[0dad5b9] | 38 | <screen os="h"><userinput>echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
| 39 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 40 | echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc
|
---|
| 41 | echo export CLFS_NOT_ENDIAN=\""${CLFS_NOT_ENDIAN}\"" >> ~/.bashrc</userinput></screen>
|
---|
[a9e389d] | 42 |
|
---|
[0dad5b9] | 43 | <table os="i">
|
---|
[a9e389d] | 44 | <title>Processor Type and Target Triplets</title>
|
---|
[3ca2208] | 45 | <?dbfo table-width="4.5in" ?>
|
---|
| 46 |
|
---|
| 47 | <tgroup cols="2">
|
---|
| 48 |
|
---|
| 49 | <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
|
---|
| 50 | <colspec colnum="2" colwidth="2in" colname="Triplet"/>
|
---|
| 51 |
|
---|
[a9e389d] | 52 | <thead>
|
---|
| 53 | <row>
|
---|
| 54 | <entry>Processor</entry>
|
---|
| 55 | <entry>Target Triplet</entry>
|
---|
| 56 | </row>
|
---|
| 57 | </thead>
|
---|
[3ca2208] | 58 |
|
---|
[a9e389d] | 59 | <tbody>
|
---|
| 60 | <row>
|
---|
| 61 | <entry>486 Compatibles</entry>
|
---|
[246191f] | 62 | <entry>i486-pc-linux-uclibc</entry>
|
---|
[a9e389d] | 63 | </row>
|
---|
| 64 | <row>
|
---|
| 65 | <entry>Pentium, K6, 586 Compatibles</entry>
|
---|
[246191f] | 66 | <entry>i586-pc-linux-uclibc</entry>
|
---|
[a9e389d] | 67 | </row>
|
---|
| 68 | <row>
|
---|
| 69 | <entry>Pentium II, Pentium III, Pentium 4</entry>
|
---|
[246191f] | 70 | <entry>i686-pc-linux-uclibc</entry>
|
---|
[a9e389d] | 71 | </row>
|
---|
| 72 | <row>
|
---|
| 73 | <entry>Athlon, Duron</entry>
|
---|
[246191f] | 74 | <entry>i686-pc-linux-uclibc</entry>
|
---|
[a9e389d] | 75 | </row>
|
---|
[128e9a4] | 76 | <row>
|
---|
| 77 | <entry>x86_64</entry>
|
---|
| 78 | <entry>x86_64-unknown-linux-uclibc</entry>
|
---|
| 79 | </row>
|
---|
[a9e389d] | 80 | </tbody>
|
---|
[3ca2208] | 81 |
|
---|
[a9e389d] | 82 | </tgroup>
|
---|
[3ca2208] | 83 |
|
---|
[a9e389d] | 84 | </table>
|
---|
| 85 |
|
---|
| 86 | </sect1>
|
---|