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

  <title>Bash-&bash-version;</title>

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

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

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

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

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

    <para os="t1">When Bash is cross-compiled, it cannot test for the presence
    of named pipes, among other things. If you used <command>su</command> to
    become an unprivileged user, this combination will cause Bash to build
    without <emphasis>process substitution</emphasis>, which will break one
    of the C++ test scripts in <literal>eglibc</literal>. The following prevents
    future problems by skipping the check for named pipes, as well as other
    tests that can not run while cross-compiling or that do not run properly:</para>

<screen os="t2"><userinput>cat &gt; config.cache &lt;&lt; "EOF"
ac_cv_func_mmap_fixed_mapped=yes
ac_cv_func_strcoll_works=yes
ac_cv_func_working_mktime=yes
bash_cv_func_sigsetjmp=present
bash_cv_getcwd_malloc=yes
bash_cv_job_control_missing=present
bash_cv_printf_a_format=yes
bash_cv_sys_named_pipes=present
bash_cv_ulimit_maxfds=yes
bash_cv_under_sys_siglist=yes
bash_cv_unusable_rtsigs=no
gt_cv_int_divbyzero_sigfpe=yes
EOF</userinput></screen>

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

<screen os="b"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --without-bash-malloc --cache-file=config.cache</userinput></screen>

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

      <varlistentry>
        <term><parameter>--without-bash-malloc</parameter></term>
        <listitem>
          <para>This option turns off the use of Bash's memory allocation
          (malloc) function which is known to cause segmentation faults.
          By turning this option off, Bash will use the malloc functions
          from Glibc which are more stable.</para>
        </listitem>
      </varlistentry>

    </variablelist>

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

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

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

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

    <para os="t3">Make a link for programs that use <command>sh</command> for
    a shell:</para>

<screen os="t4"><userinput>ln -sv bash /tools/bin/sh</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
