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

  <title>Libtool-&libtool-version; 32 Bit Libraries</title>

<!-- with the introduction of an LDEMULATION  on make check, to fix a test
 failure which has appeared for unknown reasons, this text is now specific
 to mips -o32. -->

  <indexterm zone="ch-system-libtool-32">
    <primary sortas="a-Libtool">Libtool</primary>
    <secondary>32 Bit</secondary>
  </indexterm>

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

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

    <para os="a1">The following <filename>config.cache</filename> entry
    overrides the default search path, which does not take
    multilib into account:</para>

<screen os="a2"><userinput>echo "lt_cv_sys_dlsearch_path='/lib /usr/lib /usr/local/lib /opt/lib'" &gt; config.cache</userinput></screen>

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

<screen os="b"><userinput>CC="gcc ${BUILD32}" ./configure --prefix=/usr \
    --cache-file=config.cache</userinput></screen>

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

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

    <para os="e">To test the results, first identify whether you are on a big- or
    little-endian machine.  SGI machines are usually big-endian, Cobalt are
    usually little-endian.  If in doubt you can <command>echo ${MACHTYPE} | grep 'el-'
    </command>- this will match a little-endian machine.</para>

    <para os="e2">To test on a little-endian machine issue:
    <userinput>make LDEMULATION=elf32ltsmip check</userinput>.</para>

    <para os="e1">To test on a big-endian machine issue:
    <userinput>make LDEMULATION=elf32btsmip check</userinput>.</para>

    <variablelist os="c">
      <title>The meaning of the override on make check:</title>

      <varlistentry>
        <term><parameter>LDEMULATION=[emulation]</parameter></term>
        <!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
        href="../ppc64/libtool.xml"
        xpointer="xpointer(//*[@os='c2'])"/> -->
        <listitem os="c2">
          <para>Libtool tends to do the wrong thing when building for multilib,
          at least on the non-default size(s) of architecture.  The causes of
          these errors are not well understood and they can appear, or disappear,
          as a result of apparently innocuous other changes in the build.  In
          this version of the book, one of the tests (pdemo-make) fails to link
          because it tries to link the 32-bit objects against 64-bit system
          libraries. This option enables the test to succeed without impacting
          the other tests (compare the common alternative fixes of
          <literal>LD="gcc ${BUILD32}"</literal> which causes far fewer tests
          to be executed, and configuring with
          <literal>LDFLAGS='-L/lib -L/usr/lib'</literal> which in this case
          causes other tests to fail.)</para>
        </listitem>
      </varlistentry>

    </variablelist>

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

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

    <para os="m1">Prepare <filename>libtool</filename> to be wrapped by
    the multiarch wrapper. Libtool by itself is not multilib aware:</para>

<screen os="m2"><userinput>mv -v /usr/bin/libtool{,-32}</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
