mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 05:27:39 +00:00
fba1478dba
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4433 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
39 lines
1.3 KiB
XML
39 lines
1.3 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
<sect1 id="ch-tools-adjusting">
|
|
<title>Adjusting the toolchain</title>
|
|
<?dbhtml filename="adjusting.html"?>
|
|
|
|
<para>Run the following command from within
|
|
the <filename class="directory">binutils-build</filename> directory:</para>
|
|
|
|
<screen><userinput>make -C ld install</userinput></screen>
|
|
|
|
<para>Amend the GCC specs file:</para>
|
|
|
|
<screen><userinput>SPECFILE=`gcc --print-file specs` &&
|
|
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
|
|
$SPECFILE > tempspecfile &&
|
|
mv -f tempspecfile $SPECFILE &&
|
|
unset SPECFILE</userinput></screen>
|
|
|
|
<screen><userinput>rm -f /tools/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
|
|
|
|
<para>Test the tools:</para>
|
|
|
|
<screen><userinput>echo 'main(){}' > dummy.c
|
|
cc dummy.c
|
|
readelf -l a.out | grep ': /tools'</userinput></screen>
|
|
|
|
<para>The output of the last command will be of the form:</para>
|
|
|
|
<screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen>
|
|
|
|
<screen><userinput>rm dummy.c a.out</userinput></screen>
|
|
|
|
|
|
</sect1>
|