<?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-adjusting">
  <?dbhtml filename="adjusting.html"?>

  <title>Adjusting the Toolchain</title>

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

<screen os="c"><userinput>gcc -dumpspecs | \
perl -p -e 's@/tools/lib/ld@/lib/ld@g;' \
     -e 's@/tools/lib32/ld@/lib32/ld@g;' \
     -e 's@/tools/lib64/ld@/lib64/ld@g;' \
     -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \
     `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>

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

  <para>Note that <filename class="directory">/lib</filename>,
  <filename class="directory">/lib32</filename>, or
  <filename class="directory">/lib64</filename> is now the prefix
  of our dynamic linker.</para>

  <caution>

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

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

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

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

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

    <para>For N32 ABI:</para>

<screen><userinput>echo 'main(){}' &gt; dummy.c
cc ${BUILDN32} dummy.c
readelf -l a.out | grep ': /lib'</userinput></screen>

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

<screen><computeroutput>[Requesting program interpreter: /lib32/ld.so.1]</computeroutput></screen>

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

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

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

<screen><computeroutput>[Requesting program interpreter: /lib64/ld.so.1]</computeroutput></screen>

    <para>Note that <filename class="directory">/lib</filename>,
    <filename class="directory">/lib32</filename> or
    <filename class="directory">/lib64</filename> is now the prefix
    of our dynamic linker.</para>

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

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

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

  </caution>

</sect1>
