binutils-pass2.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  7. <sect2>
  8. <title>Re-installation of Binutils</title>
  9. <para>Create a separate build directory again:</para>
  10. <screen><userinput>mkdir ../binutils-build
  11. cd ../binutils-build</userinput></screen>
  12. <para>Now prepare Binutils for compilation:</para>
  13. <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
  14. &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/tools/lib</userinput></screen>
  15. <para>The meaning of the new configure option:</para>
  16. <itemizedlist>
  17. <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
  18. the configure script to specify the default library search path. We don't want
  19. the library search path to contain library directories from the host
  20. system.</para></listitem>
  21. </itemizedlist>
  22. <para>Before starting to build Binutils, remember to unset any environment
  23. variables that override the default optimization flags.</para>
  24. <para>Compile the package:</para>
  25. <screen><userinput>make </userinput></screen>
  26. <note><para>It's worth pointing out that running the Binutils test suite here
  27. is considered not as important as running it in
  28. <xref linkend="chapter06"/>.</para></note>
  29. <para>Test the results (there should be no unexpected failures here, expected
  30. failures are fine):</para>
  31. <screen><userinput>make check</userinput></screen>
  32. <para>Unfortunately, there is no easy way to view the test results summary like
  33. there was for the previous GCC package. However, if a failure occurs here, it
  34. should be easy to spot. The output shown will contain something like:</para>
  35. <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
  36. <para>And install the package:</para>
  37. <screen><userinput>make install</userinput></screen>
  38. <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
  39. chapter:</para>
  40. <screen><userinput>make -C ld clean
  41. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
  42. <!-- HACK - Force some whitespace to appease tidy -->
  43. <literallayout></literallayout>
  44. <warning><para>Do not yet remove the Binutils source and build directories.
  45. We'll need these directories again in the next chapter in the state they are in
  46. now.</para></warning>
  47. <!-- HACK - Force some whitespace to appease tidy -->
  48. <literallayout></literallayout>
  49. </sect2>
  50. </sect1>