binutils-pass2-inst.xml 2.3 KB

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