binutils-pass2.xml 3.3 KB

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