source: clfs-sysroot/BOOK/cross-tools/arm/variables.xml@ 1b2e691

Last change on this file since 1b2e691 was cc8d737, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Use cat instead of echo wherever possible.

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[02095ae]1<?xml version="1.0" encoding="ISO-8859-1"?>
[c439b8a]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[02095ae]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.
[2e7a86a]17 The first variable will be the triplet of the host machine, which will be
18 put into the <envar>CLFS_HOST</envar> variable. To account for the
19 possibility that the host and target are the same arch, as cross-compiling
20 won't work when host and target are the same, part of the triplet needs to
21 be changed slightly to add "cross". Set <envar>CLFS_HOST</envar> using the
22 following command:</para>
[02095ae]23
[a074923]24<screen os="b"><userinput>export CLFS_HOST="$(echo $MACHTYPE | \
25 sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"</userinput></screen>
[02095ae]26
[2e7a86a]27 <para os="c">Now you will need to set the triplet for the target
28 architecture. Set the target variable using the following command:</para>
[02095ae]29
[8ef222d]30<screen os="d"><userinput>export CLFS_TARGET="arm-unknown-linux-gnu"</userinput></screen>
[02095ae]31
32 <bridgehead renderas="sect4">Copy settings to Environment</bridgehead>
33
[2e7a86a]34 <para os="e">Now add these to <filename>~/.bashrc</filename>, just in
[02095ae]35 case you have to exit and restart building later:</para>
36
[cc8d737]37<screen os="f"><userinput>cat &gt;&gt; ~/.bashrc &lt;&lt; EOF
38export CLFS_HOST="${CLFS_HOST}"
39export CLFS_TARGET="${CLFS_TARGET}"
40EOF</userinput></screen>
[02095ae]41
42</sect1>
Note: See TracBrowser for help on using the repository browser.