binutils-pass2-inst.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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>And install the package:</para>
  28. <para><screen><userinput>make install</userinput></screen></para>
  29. <para>Now prepare Binutils for the re-adjusting of the toolchain in the next
  30. chapter:</para>
  31. <para><screen><userinput>make -C ld clean
  32. make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen></para>
  33. <caution><para>Do not yet remove the Binutils source and build
  34. directories. We'll need these directories again in the next chapter in the
  35. state they are in now.</para></caution>
  36. </sect2>