readjusting.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-readjusting">
  7. <title>Re-adjusting the Toolchain</title>
  8. <?dbhtml filename="readjusting.html"?>
  9. <para>Install the adjusted linker by running the following from within the
  10. <filename class="directory">binutils-build</filename> directory:</para>
  11. <screen><userinput>make -C ld INSTALL=/tools/bin/install install</userinput></screen>
  12. <para>Amend the GCC specs file:</para>
  13. <screen><userinput>perl -pi -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g;' \
  14. -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' \
  15. `gcc --print-file specs`</userinput></screen>
  16. <caution><para>Perform a simple sanity check:</para>
  17. <screen><userinput>echo 'main(){}' &gt; dummy.c
  18. cc dummy.c
  19. readelf -l a.out | grep ': /lib'</userinput></screen>
  20. <para>The output of the last command will be:</para>
  21. <screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
  22. <para>Once you are satisfied that all is well, clean up the test files:</para>
  23. <screen><userinput>rm dummy.c a.out</userinput></screen>
  24. </caution>
  25. </sect1>