binutils-pass2-inst.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Re-installation of Binutils</title>
  4. <note><para>It's worth pointing out that the Binutils test suite we run in this
  5. section is considered not as important as the one we run in Chapter 6.</para>
  6. </note>
  7. <para>Create a separate build directory again:</para>
  8. <para><screen><userinput>mkdir ../binutils-build
  9. cd ../binutils-build</userinput></screen></para>
  10. <para>Now prepare Binutils to be compiled:</para>
  11. <para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
  12. &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/tools/lib</userinput></screen></para>
  13. <para>The meaning of the new configure option:</para>
  14. <itemizedlist>
  15. <listitem><para><userinput>--with-lib-path=/tools/lib</userinput>: This tells
  16. the configure script to specify the default library search path. We don't want
  17. the library search path to contain library directories from the host
  18. system.</para></listitem>
  19. </itemizedlist>
  20. <para>Before starting to build Binutils, remember to unset any environment
  21. variables that override the default optimization flags.</para>
  22. <para>Compile the package:</para>
  23. <para><screen><userinput>make </userinput></screen></para>
  24. <para>Test the results (there should be no unexpected failures here, expected
  25. failures are fine):</para>
  26. <para><screen><userinput>make check</userinput></screen></para>
  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. <para><screen><userinput>make install</userinput></screen></para>
  33. <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
  34. chapter:</para>
  35. <para><screen><userinput>make -C ld clean
  36. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen></para>
  37. <warning><para>Do not yet remove the Binutils source and build directories.
  38. We'll need these directories again in the next chapter in the state they are in
  39. now.</para></warning>
  40. </sect2>