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

Last change on this file since 6a5e076 was e269c28, checked in by Joe Ciccone <jciccone@…>, 13 years ago

Make sure that we change CLFS_HOST before we set it and also make sure that CLFS_HOST gets saved to the bashrc.

  • Property mode set to 100644
File size: 3.0 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  You will need to set the target triplet for the target
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
23<screen os="b"><userinput>export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")
24export CLFS_TARGET="{target triplet}"</userinput></screen>
25
26  <para os="c">Now we will setup out default architecture needed we need to build:</para>
27
28<screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')</userinput></screen>
29
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
33export CLFS_NOT_ENDIAN=BIG</userinput></screen>
34
35  <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
36  case you have to exit and restart building later:</para>
37
38<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
39echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
40echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
41echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" &gt;&gt; ~/.bashrc
42echo export CLFS_NOT_ENDIAN=\""${CLFS_NOT_ENDIAN}\"" &gt;&gt; ~/.bashrc</userinput></screen>
43
44  <table os="i">
45    <title>Processor Type and  Target Triplets</title>
46    <?dbfo table-width="4.5in" ?>
47
48    <tgroup cols="2">
49
50      <colspec colnum="1" colwidth="2.5in"   colname="Processor"/>
51      <colspec colnum="2" colwidth="2in" colname="Triplet"/>
52
53      <thead>
54        <row>
55          <entry>Processor</entry>
56          <entry>Target Triplet</entry>
57        </row>
58      </thead>
59
60      <tbody>
61        <row>
62          <entry>486 Compatibles</entry>
63          <entry>i486-pc-linux-uclibc</entry>
64        </row>
65        <row>
66          <entry>Pentium, K6, 586 Compatibles</entry>
67          <entry>i586-pc-linux-uclibc</entry>
68        </row>
69        <row>
70          <entry>Pentium II, Pentium III, Pentium 4</entry>
71          <entry>i686-pc-linux-uclibc</entry>
72        </row>
73        <row>
74          <entry>Athlon, Duron</entry>
75          <entry>i686-pc-linux-uclibc</entry>
76        </row>
77        <row>
78          <entry>x86_64</entry>
79          <entry>x86_64-unknown-linux-uclibc</entry>
80        </row>
81      </tbody>
82
83    </tgroup>
84
85  </table>
86
87</sect1>
Note: See TracBrowser for help on using the repository browser.