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

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

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

  </sect2>

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

    <para os="ba">Coreutils has an issue where  UTILS_OPEN_MAX does not get
    defined when cross-compiling. So we define it:</para>

<screen os="bc"><userinput>echo "utils_cv_sys_open_max=1024" &gt;&gt; config.cache</userinput></screen>

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

<screen><userinput>./configure --prefix=/tools --cache-file=config.cache \
   --build=${LFS_HOST} --host=${LFS_TARGET}</userinput></screen>

    <variablelist os="be">
      <title>The meaning of the configure options:</title>

      <varlistentry>
        <term><parameter>DEFAULT_POSIX2_VERSION=199209</parameter></term>
        <listitem>
          <para>This package has an issue when compiled against versions of
          Glibc later than 2.3.2. Some of the Coreutils utilities (such as
          <command>head</command>, <command>tail</command>, and
          <command>sort</command>) will reject their traditional syntax, a
          syntax that has been in use for approximately 30 years. This old
          syntax is so pervasive that compatibility should be preserved until
          the many places where it is used can be updated. Backwards compatibility
          is achieved by setting the <envar>DEFAULT_POSIX2_VERSION</envar>
          environment variable to <quote>199209</quote> in the above command.
          If you do not want Coreutils to be backwards compatible with the
          traditional syntax, then omit setting the
          <envar>DEFAULT_POSIX2_VERSION</envar> environment variable. It is
          important to remember that doing so will have consequences, including
          the need to patch the many packages that still use the old syntax.
          Therefore, it is recommended that the instructions be followed exactly
          as given above.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>--cache-file=config.cache</parameter></term>
        <listitem>
          <para>This do ...</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>
