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

<sect1 id="ch-temp-system-gcc" role="wrap">
  <?dbhtml filename="gcc.html"?>

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

  <indexterm zone="ch-temp-system-gcc">
    <primary sortas="a-GCC">GCC</primary>
    <secondary>temporary system</secondary>
  </indexterm>

  <sect2 role="package">
    <title/>

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

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>Not checked yet</seg>
        <seg>Not checked yet</seg>
      </seglistitem>
    </segmentedlist>

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

  </sect2>

  <sect2 role="installation">
    <title>Installation of GCC</title>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
    --build=${LFS_HOST} --host=${LFS_TARGET} --target=${LFS_TARGET} \
    --libexecdir=/tools/lib --with-local-prefix=/tools --enable-long-long \
    --enable-c99 --enable-shared --enable-threads=posix --enable-__cxa_atexit \
    --disable-nls --enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>

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

    <para>Compile the package:</para>

<screen><userinput>make CFLAGS_FOR_TARGET="${GCCTARGET}" CXXFLAGS_FOR_TARGET="${GCCTARGET}" \
AS_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-as" LD_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-ld"</userinput></screen>

    <para>Install the package:</para>

<screen><userinput>make install</userinput></screen>

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

<screen><userinput>ln -s gcc /tools/bin/cc</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-gcc" role="."/></para>

  </sect2>

</sect1>
