lfs/chapter06/readjusting.xml
Matthew Burgess 17700191e9 Upgraded to DocBook 4.4 DTD
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4603 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2005-01-30 18:06:48 +00:00

38 lines
1.3 KiB
XML

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