binutils-pass2.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <sect1 id="ch-tools-binutils-pass2">
  2. <title>Installing Binutils-&binutils-version; - Pass 2</title>
  3. <?dbhtml filename="binutils-pass2.html" dir="chapter05"?>
  4. <screen>&buildtime; &binutils-time-tools-pass2;
  5. &diskspace; &binutils-compsize-tools-pass2;</screen>
  6. &aa-binutils-down;
  7. &aa-binutils-dep;
  8. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  9. <sect2>
  10. <title>Re-installation of Binutils</title>
  11. <para>Create a separate build directory again:</para>
  12. <screen><userinput>mkdir ../binutils-build
  13. cd ../binutils-build</userinput></screen>
  14. <para>Now prepare Binutils for compilation:</para>
  15. <screen><userinput>../&binutils-dir;/configure --prefix=/tools \
  16. &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/tools/lib</userinput></screen>
  17. <para>The meaning of the new configure option:</para>
  18. <itemizedlist>
  19. <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
  20. the configure script to specify the library search path during the compilation
  21. of Binutils, resulting in <emphasis>/tools/lib</emphasis> to be passed to the
  22. linker. This prevents the linker from searching through library directories on
  23. the host.</para></listitem>
  24. </itemizedlist>
  25. <para>Before starting to build Binutils, remember to unset any environment
  26. variables that override the default optimization flags.</para>
  27. <para>Compile the package:</para>
  28. <screen><userinput>make</userinput></screen>
  29. <para>Compilation is now complete. As discussed earlier, we don't recommend
  30. running the test suites for the temporary tools here in this chapter. If
  31. nevertheless you want to run the Binutils test suite, the following command
  32. will do so:</para>
  33. <screen><userinput>make check</userinput></screen>
  34. <para>There should be no unexpected failures here, expected failures are fine.
  35. Unfortunately, there is no easy way to view the test results summary like there
  36. was for the GCC package. However, if a failure occurs here, it should be easy
  37. to spot. The output shown will contain something like:</para>
  38. <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
  39. <para>And install the package:</para>
  40. <screen><userinput>make install</userinput></screen>
  41. <para>Now prepare the linker for the "Re-adjusting" phase in the next
  42. chapter:</para>
  43. <screen><userinput>make -C ld clean
  44. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
  45. <!-- HACK - Force some whitespace to appease tidy -->
  46. <literallayout></literallayout>
  47. <warning><para><emphasis>Do not yet remove</emphasis> the Binutils source and
  48. build directories. You will need these directories again in the next chapter
  49. in the state they are in now.</para></warning>
  50. <!-- HACK - Force some whitespace to appease tidy -->
  51. <literallayout></literallayout>
  52. </sect2>
  53. <sect2><title>&nbsp;</title><para>&nbsp;</para>
  54. <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
  55. <para>&nbsp;</para></sect2>
  56. </sect1>