binutils-pass2.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-tools-binutils-pass2" role="wrap">
  8. <?dbhtml filename="binutils-pass2.html"?>
  9. <title>Binutils-&binutils-version; - Pass 2</title>
  10. <indexterm zone="ch-tools-binutils-pass2">
  11. <primary sortas="a-Binutils">Binutils</primary>
  12. <secondary>tools, pass 2</secondary>
  13. </indexterm>
  14. <sect2 role="package">
  15. <title/>
  16. <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  17. href="../chapter06/binutils.xml"
  18. xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
  19. <segmentedlist>
  20. <segtitle>&buildtime;</segtitle>
  21. <segtitle>&diskspace;</segtitle>
  22. <seglistitem>
  23. <seg>&binutils-ch5p2-sbu;</seg>
  24. <seg>&binutils-ch5p2-du;</seg>
  25. </seglistitem>
  26. </segmentedlist>
  27. </sect2>
  28. <sect2 role="installation">
  29. <title>Re-installation of Binutils</title>
  30. <para>Create a separate build directory again:</para>
  31. <screen><userinput>mkdir -v ../binutils-build
  32. cd ../binutils-build</userinput></screen>
  33. <para>Prepare Binutils for compilation:</para>
  34. <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
  35. --disable-nls --with-lib-path=/tools/lib \
  36. --disable-multilib</userinput></screen>
  37. <variablelist>
  38. <title>The meaning of the new configure options:</title>
  39. <varlistentry>
  40. <term><parameter>--with-lib-path=/tools/lib</parameter></term>
  41. <listitem>
  42. <para>This tells the configure script to specify the library
  43. search path during the compilation of Binutils, resulting in
  44. <filename class="directory">/tools/lib</filename> being passed
  45. to the linker. This prevents the linker from searching through
  46. library directories on the host.</para>
  47. </listitem>
  48. </varlistentry>
  49. </variablelist>
  50. <para>Compile the package:</para>
  51. <screen><userinput>make</userinput></screen>
  52. <para>Compilation is now complete. As discussed earlier, running the
  53. test suite is not mandatory for the temporary tools here in this
  54. chapter. To run the Binutils test suite anyway, issue the following
  55. command:</para>
  56. <screen><userinput>make check</userinput></screen>
  57. <para>Install the package:</para>
  58. <screen><userinput>make install</userinput></screen>
  59. <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
  60. the next chapter:</para>
  61. <screen><userinput>make -C ld clean
  62. make -C ld LIB_PATH=/usr/lib:/lib
  63. cp -v ld/ld-new /tools/bin</userinput></screen>
  64. </sect2>
  65. <sect2 role="content">
  66. <title/>
  67. <para>Details on this package are located in
  68. <xref linkend="contents-binutils" role="."/></para>
  69. </sect2>
  70. </sect1>