<?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/2001/XInclude"
  href="../../final-system/common/coreutils.xml"
  xpointer="xpointer(//*[@role='package'])"/>

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

    <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 entries to <filename>config.cache</filename>
    to correct this, and fix various cross-compiling issues:</para>

<screen os="bb"><userinput>cat &gt; config.cache &lt;&lt; EOF
fu_cv_sys_stat_statfs2_bsize=yes
gl_cv_func_working_mkstemp=yes
EOF</userinput></screen>

    <para os="p1">Apply a patch to prevent Coreutils from generating manpages :</para>

<screen os="p2"><userinput>patch -Np1 -i ../&coreutils-noman-patch;</userinput></screen>

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

<screen os="be"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --enable-install-program=hostname --cache-file=config.cache</userinput></screen>

    <variablelist os="be1">
      <title>The meaning of the new configure option:</title>

      <varlistentry>
        <term><parameter>--enable-install-program=hostname</parameter></term>
        <listitem>
          <para>Tells Coreutils to install <command>hostname</command>,
          which is needed for the Perl test suite.</para>
        </listitem>
      </varlistentry>

    </variablelist>

   <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>
