<?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-temp-system-coreutils" role="wrap">
  <?dbhtml filename="coreutils.html"?>

  <title>Coreutils-&coreutils-version;</title>

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

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

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

    <para os="bs1">Coreutils attempts to use the <command>install</command>
    program it just built to perform the install. This will not work if the
    target architecture is incompatible with the host architecture. The
    following command causes the Makefile to use the host's
    <command>install</command> to perform the install:</para>

<screen os="bs2"><userinput>cp -v src/Makefile.in{,.orig}
sed -e "/binPROGRAMS_INSTALL=/s:./ginstall:install:" src/Makefile.in.orig > src/Makefile.in</userinput></screen>

    <para os="ba">Configure can not properly determine how to get free space
    when cross-compiling - as a result, the <command>df</command> program will
    not be built. Add the following entry to <filename>config.cache</filename>
    to correct this:</para>

<screen os="bb"><userinput>echo "fu_cv_sys_stat_statfs2_bsize=yes" &gt; config.cache</userinput></screen>

    <para os="bd">Prepare Coreutils for compilation:</para>

<screen os="be"><userinput>./configure --prefix=/tools \
    --cache-file=config.cache</userinput></screen>

   <para os="bf">Compile the package:</para>

<screen os="bg"><userinput>make</userinput></screen>

    <para os="bh">Install the package:</para>

<screen os="bi"><userinput>make install</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
