binutils-pass2.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <sect1 id="ch05-binutils-pass2">
  2. <title>Installing Binutils-&binutils-version; - Pass 2</title>
  3. <?dbhtml filename="binutils-pass2.html" dir="chapter05"?>
  4. <screen>Estimated build time: &binutils-time-tools-pass2;
  5. Estimated required disk space: &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 default library search path. We don't want
  21. the library search path to contain library directories from the host
  22. system.</para></listitem>
  23. </itemizedlist>
  24. <para>Before starting to build Binutils, remember to unset any environment
  25. variables that override the default optimization flags.</para>
  26. <para>Compile the package:</para>
  27. <screen><userinput>make</userinput></screen>
  28. <para>Compilation is now complete. As discussed earlier, we don't recommend
  29. running the test suites for the temporary tools here in this chapter. If you
  30. still want to run the Binutils test suite anyway, the following command will
  31. do so:</para>
  32. <screen><userinput>make check</userinput></screen>
  33. <para>There should be no unexpected failures here, expected failures are fine.
  34. Unfortunately, there is no easy way to view the test results summary like
  35. there was for the previous GCC package. However, if a failure occurs here, it
  36. should be easy to spot. The output shown will contain something like:</para>
  37. <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
  38. <para>And install the package:</para>
  39. <screen><userinput>make install</userinput></screen>
  40. <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
  41. chapter:</para>
  42. <screen><userinput>make -C ld clean
  43. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
  44. <!-- HACK - Force some whitespace to appease tidy -->
  45. <literallayout></literallayout>
  46. <warning><para>Do not yet remove the Binutils source and build directories.
  47. We'll need these directories again in the next chapter in the state they are in
  48. now.</para></warning>
  49. <!-- HACK - Force some whitespace to appease tidy -->
  50. <literallayout></literallayout>
  51. </sect2>
  52. <sect2><title>&nbsp;</title><para>&nbsp;</para>
  53. <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
  54. <para>&nbsp;</para></sect2>
  55. </sect1>