source: clfs-embedded/BOOK/cross-tools/x86/variables.xml @ 5470f08

Last change on this file since 5470f08 was 5470f08, checked in by Andrew Bradford <andrew@…>, 11 years ago

variables: Put tables near where used

Rather than all at the bottom, which was really annoying.

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[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.
[8ffc8f19]17  You will need to set the target triplet for the target architecture, and the
18  CPU type. If you do not know what triplet or CPU type you want,
[5470f08]19  you can use the table as a reference. Set
[a9e389d]20  the command using the method listed below:</para>
21
[e269c28]22<screen os="b"><userinput>export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")
[6b723ad]23export CLFS_TARGET=<replaceable>[target triplet]</replaceable>
24export CLFS_CPU=<replaceable>[cpu type]</replaceable></userinput></screen>
[a9e389d]25
[0dad5b9]26  <table os="i">
[a9e389d]27    <title>Processor Type and  Target Triplets</title>
[6b723ad]28    <?dbfo table-width="7.5in" ?>
[3ca2208]29
[5c58544]30    <tgroup cols="4">
[3ca2208]31
32      <colspec colnum="1" colwidth="2.5in"   colname="Processor"/>
33      <colspec colnum="2" colwidth="2in" colname="Triplet"/>
[6b723ad]34      <colspec colnum="3" colwidth="0.5in" colname="CPU Type"/>
35      <colspec colnum="4" colwidth="2.5in" colname="Note"/>
[3ca2208]36
[a9e389d]37      <thead>
38        <row>
39          <entry>Processor</entry>
40          <entry>Target Triplet</entry>
[6b723ad]41          <entry>CPU Type</entry>
42          <entry>Note</entry>
[a9e389d]43        </row>
44      </thead>
[3ca2208]45
[a9e389d]46      <tbody>
47        <row>
48          <entry>486 Compatibles</entry>
[75a0379]49          <entry>i486-pc-linux-musl</entry>
[6b723ad]50          <entry>i486</entry>
51          <entry>Intel's i486</entry>
[a9e389d]52        </row>
53        <row>
54          <entry>Pentium, K6, 586 Compatibles</entry>
[75a0379]55          <entry>i586-pc-linux-musl</entry>
[6b723ad]56          <entry>i586</entry>
57          <entry>Intel Pentium without MMX</entry>
[a9e389d]58        </row>
59        <row>
60          <entry>Pentium II, Pentium III, Pentium 4</entry>
[75a0379]61          <entry>i686-pc-linux-musl</entry>
[6b723ad]62          <entry>i686</entry>
63          <entry>PentiumPro instruction set</entry>
[a9e389d]64        </row>
65        <row>
[6b723ad]66          <entry>Athlon</entry>
[75a0379]67          <entry>i686-pc-linux-musl</entry>
[6b723ad]68          <entry>athlon</entry>
69          <entry>AMD 32 bit Athlon</entry>
[a9e389d]70        </row>
[128e9a4]71        <row>
[6b723ad]72          <entry>Opteron</entry>
[75a0379]73          <entry>x86_64-unknown-linux-musl</entry>
[6b723ad]74          <entry>k8</entry>
75          <entry>AMD K8 processors with x86-64</entry>
[128e9a4]76        </row>
[a9e389d]77      </tbody>
[3ca2208]78
[a9e389d]79    </tgroup>
[3ca2208]80
[a9e389d]81  </table>
82
[5470f08]83  <para os="c">Now we will set the architecture of the CPU based
84  on the target triplet provided above:</para>
85
86<screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')</userinput></screen>
87
88  <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
89  case you have to exit and restart building later:</para>
90
91<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
92echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
93echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
94echo export CLFS_CPU=\""${CLFS_CPU}\"" &gt;&gt; ~/.bashrc</userinput></screen>
95
[a9e389d]96</sect1>
Note: See TracBrowser for help on using the repository browser.