<?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">
  %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/2003/XInclude"
  href="../common/libtool.xml"
  xpointer="xpointer(//*[@role='package'])"/>

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

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

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

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

    <xi:include xmlns:xi="http://www.w3.org/2003/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/2003/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.  These 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/2003/XInclude"
    href="../common/libtool.xml"
    xpointer="xpointer(//*[@os='f'])"/>

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

  </sect2>

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

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

  </sect2>

</sect1>
