| [8672967] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
 | 
|---|
| [aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
 | 3 |   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
| [8672967] | 4 |   <!ENTITY % general-entities SYSTEM "../../general.ent">
 | 
|---|
 | 5 |   %general-entities;
 | 
|---|
 | 6 | ]>
 | 
|---|
 | 7 | 
 | 
|---|
| [e02f05d] | 8 | <sect1 id="ch-final-preps-variables">
 | 
|---|
| [8672967] | 9 |   <?dbhtml filename="variables.html"?>
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 |   <title>Build Variables</title>
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 |   <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
 | 
|---|
 | 14 | 
 | 
|---|
| [dabbced] | 15 |     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
 | 
|---|
| [8672967] | 16 |     href="../x86/variables.xml"
 | 
|---|
 | 17 |     xpointer="xpointer(//*[@os='a'])"/>
 | 
|---|
 | 18 | 
 | 
|---|
| [dabbced] | 19 |     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
 | 
|---|
| [8672967] | 20 |     href="../x86/variables.xml"
 | 
|---|
 | 21 |     xpointer="xpointer(//*[@os='b'])"/>
 | 
|---|
 | 22 | 
 | 
|---|
| [dabbced] | 23 |     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
 | 
|---|
| [7030b60] | 24 |     href="../x86/variables.xml"
 | 
|---|
 | 25 |     xpointer="xpointer(//*[@os='c'])"/>
 | 
|---|
| [8672967] | 26 | 
 | 
|---|
| [dfd73bad] | 27 | <screen os="d"><userinput>export CLFS_TARGET="x86_64-unknown-linux-gnu"</userinput></screen>
 | 
|---|
| [8672967] | 28 | 
 | 
|---|
| [01817d3] | 29 |   <para os="e">Now set the target triplet for 32 bits:</para>
 | 
|---|
| [8672967] | 30 | 
 | 
|---|
| [dfd73bad] | 31 | <screen os="f"><userinput>export CLFS_TARGET32="i686-pc-linux-gnu"</userinput></screen>
 | 
|---|
| [01817d3] | 32 | 
 | 
|---|
 | 33 |   <para os="g">We will need to setup target-specific flags for the compiler
 | 
|---|
 | 34 |   and linker:</para>
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 | <screen os="h"><userinput>export BUILD32="-m32"
 | 
|---|
 | 37 | export BUILD64="-m64"</userinput></screen>
 | 
|---|
| [8672967] | 38 | 
 | 
|---|
 | 39 |   <bridgehead renderas="sect4">Copy settings to Environment</bridgehead>
 | 
|---|
 | 40 | 
 | 
|---|
| [01817d3] | 41 |   <para os="i">Now add the host and target variables, and compiler and linker
 | 
|---|
 | 42 |   flags, to <filename>~/.bashrc</filename>, just in case you have to exit and
 | 
|---|
 | 43 |   restart building later:</para>
 | 
|---|
| [8672967] | 44 | 
 | 
|---|
| [01817d3] | 45 | <screen os="j"><userinput>cat >> ~/.bashrc << EOF
 | 
|---|
| [c63dde1] | 46 | export CLFS_HOST="${CLFS_HOST}"
 | 
|---|
 | 47 | export CLFS_TARGET="${CLFS_TARGET}"
 | 
|---|
 | 48 | export CLFS_TARGET32="${CLFS_TARGET32}"
 | 
|---|
| [01817d3] | 49 | export BUILD32="${BUILD32}"
 | 
|---|
 | 50 | export BUILD64="${BUILD64}"
 | 
|---|
| [c63dde1] | 51 | EOF</userinput></screen>
 | 
|---|
| [8672967] | 52 | 
 | 
|---|
 | 53 | </sect1>
 | 
|---|