<?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;
]>

<!-- ARM GCC-Static -->

<sect1 id="ch-cross-tools-gcc-static" role="wrap">
  <?dbhtml filename="gcc-static.html"?>

  <title>Cross GCC-&gcc-version; - Static</title>

  <indexterm zone="ch-cross-tools-gcc-static">
    <primary sortas="a-GCC">GCC</primary>
    <secondary>cross tools, static</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='a'])"/>

  <important>

    <para>If you set ${CLFS_FLOAT} to "soft" or "softfp", you must apply the 
    &gcc-uclibc-arm-softfloat-patch;.  Check what ${CLFS_FLOAT} is set to and
    if needed, apply the patch:</para>

<screen><userinput>echo ${CLFS_FLOAT}
patch -Np1 -i ../&gcc-uclibc-arm-softfloat-patch;</userinput></screen>

  </important>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='c'])"/>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='d'])"/>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='e'])"/>

<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
  ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
  --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
  --with-sysroot=${CLFS} --disable-nls  --disable-shared \
  --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
  --with-mpc=${CLFS}/cross-tools --without-headers --with-newlib \
  --disable-decimal-float --disable-libgomp --disable-libmudflap \
  --disable-libssp --disable-threads --enable-languages=c \
  --disable-multilib --with-abi=${CLFS_ABI} --with-arch=${CLFS_ARM_ARCH} \
  --with-mode=${CLFS_ARM_MODE} --with-float=${CLFS_FLOAT} \
  --with-fpu=${CLFS_FPU}</userinput></screen>

<!-- Common configure switches for all archs -->
  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='af'])"/>

<!-- Specific configure switches for ARM -->
  <variablelist os="ag">

    <varlistentry os="ag1">
      <term><parameter>--with-abi=${CLFS_ABI}</parameter></term>
      <listitem>
        <para>This option sets the ABI selected earlier.</para>
      </listitem>
    </varlistentry>
    <varlistentry os="ag2">
      <term><parameter>--with-arch=${CLFS_ARM_ARCH}</parameter></term>
      <listitem>
        <para>This option sets the ARM architecture selected earlier.</para>
      </listitem>
    </varlistentry>
    <varlistentry os="ag3">
      <term><parameter>--with-mode=${CLFS_ARM_MODE}</parameter></term>
      <listitem>
        <para>This option sets the ARM mode (arm or thumb) selected earlier.</para>
      </listitem>
    </varlistentry>
    <varlistentry os="ag4">
      <term><parameter>--with-float=${CLFS_FLOAT}</parameter></term>
      <listitem>
        <para>This option sets the floating point mode selected earlier.</para>
      </listitem>
    </varlistentry>
    <varlistentry os="ag5">
      <term><parameter>--with-fpu=${CLFS_FPU}</parameter></term>
      <listitem>
        <para>This option sets the hardware floating point type selected 
        earlier.  If soft floating point was selected, this value is ignored.</para>
      </listitem>
    </varlistentry>

  </variablelist>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='ah'])"/>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='ai'])"/>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='aj'])"/>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@os='ak'])"/>

  </sect2>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../common/gcc-static.xml"
  xpointer="xpointer(//*[@role='content'])"/>

</sect1>
