<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-final-preps-variables">
  <?dbhtml filename="variables.html"?>

  <title>Build Variables</title>

  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../x86/variables.xml"
    xpointer="xpointer(//*[@os='a'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../x86/variables.xml"
    xpointer="xpointer(//*[@os='b'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../x86/variables.xml"
    xpointer="xpointer(//*[@os='c'])"/>

<screen os="d"><userinput>export CLFS_TARGET="sparc64-unknown-linux-gnu"</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../x86_64/variables.xml"
    xpointer="xpointer(//*[@os='e'])"/>

<screen os="f"><userinput>export CLFS_TARGET32="sparcv9-unknown-linux-gnu"</userinput></screen>

  <para os="g">We will need to setup target specific flags for the compiler
  and linkers. You can choose the appropriate BUILD32, BUILD64, and GCCTARGET
  from the table at the bottom of the page.</para>

<screen os="h"><userinput>export BUILD32="<replaceable>[BUILD32 entries]</replaceable>"
export BUILD64="<replaceable>[BUILD64 entries]</replaceable>"
export GCCTARGET="<replaceable>[GCCTARGET entries]</replaceable>"</userinput></screen>

  <bridgehead renderas="sect4">Copy settings to Environment</bridgehead>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../x86_64/variables.xml"
    xpointer="xpointer(//*[@os='i'])"/>

<screen os="j"><userinput>cat &gt;&gt; ~/.bashrc &lt;&lt; EOF
export CLFS_HOST="${CLFS_HOST}"
export CLFS_TARGET="${CLFS_TARGET}"
export CLFS_TARGET32="${CLFS_TARGET32}"
export BUILD32="${BUILD32}"
export BUILD64="${BUILD64}"
export GCCTARGET="${GCCTARGET}"
EOF</userinput></screen>

  <para os="k">The following table gives the entries for different Sparc 64 capable
  processors. Pick the processor that matches your system. Note: GCC settings are
  only needed in the early sections of the book, and will not be used in the final-system
  builds.</para>

  <table os="l">
    <title>List of 32-Bit settings, 64-Bit Build settings, and GCC setting</title>
    <?dbfo table-width="7in" ?>

    <tgroup cols="4">

      <colspec colnum="1" colwidth="1in" colname="Processor"/>
      <colspec colnum="2" colwidth="2in" colname="Build32"/>
      <colspec colnum="3" colwidth="2in" colname="Build64"/>
      <colspec colnum="4" colwidth="2in" colname="GCC"/>

      <thead>
        <row>
          <entry>Processor</entry>
          <entry>BUILD32</entry>
          <entry>BUILD64</entry>
          <entry>GCCTARGET</entry>
        </row>
      </thead>

      <tbody>
        <row>
          <entry>Ultrasparc and Ultrasparc2</entry>
          <entry>-m32 -mcpu=ultrasparc -mtune=ultrasparc</entry>
          <entry>-m64 -mcpu=ultrasparc -mtune=ultrasparc</entry>
          <entry>-mcpu=ultrasparc -mtune=ultrasparc</entry>
        </row>
        <row>
          <entry>Ultrasparc3</entry>
          <entry>-m32 -mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
          <entry>-m64 -mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
          <entry>-mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
        </row>
      </tbody>

    </tgroup>

  </table>

</sect1>
