binutils-pass2.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/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</userinput></screen>
  36. <variablelist>
  37. <title>The meaning of the new configure options:</title>
  38. <varlistentry>
  39. <term><parameter>--with-lib-path=/tools/lib</parameter></term>
  40. <listitem>
  41. <para>This tells the configure script to specify the library
  42. search path during the compilation of Binutils, resulting in
  43. <filename class="directory">/tools/lib</filename> being passed
  44. to the linker. This prevents the linker from searching through
  45. library directories on the host.</para>
  46. </listitem>
  47. </varlistentry>
  48. </variablelist>
  49. <para>Compile the package:</para>
  50. <screen><userinput>make</userinput></screen>
  51. <para>Compilation is now complete. As discussed earlier, running the
  52. test suite is not mandatory for the temporary tools here in this
  53. chapter. To run the Binutils test suite anyway, issue the following
  54. command:</para>
  55. <screen><userinput>make check</userinput></screen>
  56. <para>Install the package:</para>
  57. <screen><userinput>make install</userinput></screen>
  58. <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
  59. the next chapter:</para>
  60. <screen><userinput>make -C ld clean
  61. make -C ld LIB_PATH=/usr/lib:/lib
  62. cp -v ld/ld-new /tools/bin</userinput></screen>
  63. </sect2>
  64. <sect2 role="content">
  65. <title/>
  66. <para>Details on this package are located in
  67. <xref linkend="contents-binutils" role="."/></para>
  68. </sect2>
  69. </sect1>