binutils-pass2.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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-&binutils-version;/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. <note><para>It's worth pointing out that running the Binutils test suite here
  29. is considered not as important as running it in
  30. <xref linkend="chapter06"/>.</para></note>
  31. <para>Test the results (there should be no unexpected failures here, expected
  32. failures are fine):</para>
  33. <screen><userinput>make check</userinput></screen>
  34. <para>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>