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

<!-- x86 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'])"/>

  <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-arch=${CLFS_CPU}</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 x86 -->
  <variablelist os="ag">

    <varlistentry os="ag1">
      <term><parameter>--with-arch=${CLFS_CPU}</parameter></term>
      <listitem>
        <para>This option configures the cross compiler to only output
        instructions for our previously selected CPU.</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>
