binutils-pass2.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-tools-binutils-pass2">
  7. <title>Binutils-&binutils-version; - Pass 2</title>
  8. <?dbhtml filename="binutils-pass2.html"?>
  9. <indexterm zone="ch-tools-binutils-pass2">
  10. <primary sortas="a-Binutils">Binutils</primary>
  11. <secondary>tools, pass 2</secondary></indexterm>
  12. <screen>&buildtime; 1.5 SBU
  13. &diskspace; 108 MB</screen>
  14. <sect2>
  15. <title>Re-installation of Binutils</title>
  16. <para>Create a separate build directory again:</para>
  17. <screen><userinput>mkdir ../binutils-build
  18. cd ../binutils-build</userinput></screen>
  19. <para>Now prepare Binutils for compilation:</para>
  20. <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
  21. --enable-shared --with-lib-path=/tools/lib</userinput></screen>
  22. <para>The meaning of the new configure option:</para>
  23. <itemizedlist>
  24. <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
  25. the configure script to specify the library search path during the compilation
  26. of Binutils, resulting in <emphasis>/tools/lib</emphasis> to be passed to the
  27. linker. This prevents the linker from searching through library directories on
  28. the host.</para></listitem>
  29. </itemizedlist>
  30. <para>Before starting to build Binutils, remember to unset any environment
  31. variables that override the default optimization flags.</para>
  32. <para>Compile the package:</para>
  33. <screen><userinput>make</userinput></screen>
  34. <para>Compilation is now complete. As discussed earlier, we don't recommend
  35. running the test suites for the temporary tools here in this chapter. If
  36. nevertheless you want to run the Binutils test suite, the following command
  37. will do so:</para>
  38. <screen><userinput>make -k check</userinput></screen>
  39. <para>Except for a few known failures, the binutils tests should all pass. The
  40. exceptions to this rule are as follows:</para>
  41. <screen>* 5 FAIL (unexpected failure) for visibility
  42. * 1 FAIL for selective4
  43. * 1 FAIL for selective5</screen>
  44. <!--
  45. <para>There should be no unexpected failures here, expected failures are fine.
  46. Unfortunately, there is no easy way to view the test results summary like there
  47. was for the GCC package. However, if a failure occurs here, it should be easy
  48. to spot. The output shown will contain something like:</para>
  49. <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
  50. -->
  51. <para>And install the package:</para>
  52. <screen><userinput>make install</userinput></screen>
  53. <para>Now prepare the linker for the "Re-adjusting" phase in the next
  54. chapter:</para>
  55. <screen><userinput>make -C ld clean
  56. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
  57. <warning><para><emphasis>Do not yet remove</emphasis> the Binutils source and
  58. build directories. You will need these directories again in the next chapter
  59. in the state they are in now.</para></warning>
  60. </sect2>
  61. <sect2><title> </title><para> </para>
  62. <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
  63. <para> </para></sect2>
  64. </sect1>