source: clfs-embedded/BOOK/cross-tools/common/variables.xml @ ae8e977

Last change on this file since ae8e977 was 7926af1, checked in by Andrew Bradford <bradfa@…>, 13 years ago

Cleaned up Build Variables sections

Everyone was referencing the x86 Build Variables section but now x86
has some unique variables. So created a common/vairables.xml from
the existing x86/variables.xml but removed parts that weren't common.

Now arm and mips both reference the common/variables.xml file and have
their unique parts.

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[7926af1]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<screen os="b"><userinput>export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")
16export CLFS_TARGET=<replaceable>[target triplet]</replaceable></userinput></screen>
17
18  <para os="c">Now we will set the architecture and endianess of the CPU based
19  on the target triplet provided above:</para>
20
21<screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')
22export CLFS_ENDIAN=little</userinput></screen>
23
24  <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in
25  case you have to exit and restart building later:</para>
26
27<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
28echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
29echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
30echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" &gt;&gt; ~/.bashrc</userinput></screen>
31
32</sect1>
Note: See TracBrowser for help on using the repository browser.