adjusting.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-tools-adjusting">
  7. <title>Adjusting the Toolchain</title>
  8. <?dbhtml filename="adjusting.html"?>
  9. <para>Run the following command from within
  10. the <filename class="directory">binutils-build</filename> directory:</para>
  11. <screen><userinput>make -C ld install</userinput></screen>
  12. <para>Amend the GCC specs file:</para>
  13. <screen><userinput>SPECFILE=`gcc --print-file specs` &amp;&amp;
  14. sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
  15. $SPECFILE &gt; tempspecfile &amp;&amp;
  16. mv -f tempspecfile $SPECFILE &amp;&amp;
  17. unset SPECFILE</userinput></screen>
  18. <para>Make clean-up:</para>
  19. <screen><userinput>rm -f /tools/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
  20. <para>Test the tools:</para>
  21. <screen><userinput>echo 'main(){}' &gt; dummy.c
  22. cc dummy.c
  23. readelf -l a.out | grep ': /tools'</userinput></screen>
  24. <para>The output of the last command will be of the form:</para>
  25. <screen><computeroutput>[Requesting program interpreter:
  26. /tools/lib/ld-linux.so.2]</computeroutput></screen>
  27. <para>Remove the test files:</para>
  28. <screen><userinput>rm dummy.c a.out</userinput></screen>
  29. </sect1>