2003-05-02 19:20:20 +01:00
|
|
|
<sect1 id="ch05-locking-glibc">
|
|
|
|
<title>"Locking in" Glibc</title>
|
|
|
|
<?dbhtml filename="lockingglibc.html" dir="chapter05"?>
|
|
|
|
|
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
|
|
|
|
<sect2>
|
2003-06-03 23:25:25 +01:00
|
|
|
<title>Installation of the linker scripts</title>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2003-05-11 03:44:11 +01:00
|
|
|
<para><screen><userinput>make -C ld install-data-local</userinput></screen></para>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2003-06-03 23:25:25 +01:00
|
|
|
<para>This installs the adjusted linker scripts. Remember they were adjusted
|
|
|
|
a little while back, at the end of the first pass of Binutils? The linker
|
|
|
|
scripts now contain no mention of <filename>/lib</filename>,
|
|
|
|
<filename>/usr/lib</filename> or <filename>/usr/local/lib</filename>.
|
|
|
|
From this point onwards everything will link <emphasis>only</emphasis>
|
|
|
|
against the libraries in <filename>/stage1/lib</filename>.</para>
|
2003-05-06 23:53:37 +01:00
|
|
|
|
2003-08-11 23:49:50 +01:00
|
|
|
<para>You can now remove Binutils' build and source directories.</para>
|
2003-06-03 23:25:25 +01:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Amending GCC's specs file</title>
|
|
|
|
|
|
|
|
<para>The final thing to do is to amend our GCC specs file so that it points
|
|
|
|
to the new dynamic linker. A simple sed will accomplish this:</para>
|
|
|
|
|
2003-05-10 18:20:47 +01:00
|
|
|
<para><screen><userinput>SPECFILE=/stage1/lib/gcc-lib/*/*/specs
|
|
|
|
sed -e 's@/lib/ld.so.1@/stage1/lib/ld.so.1@g' \
|
|
|
|
-e 's@/lib/ld-linux.so.2@/stage1/lib/ld-linux.so.2@g' \
|
|
|
|
$SPECFILE > XX
|
|
|
|
mv XX $SPECFILE
|
|
|
|
unset SPECFILE</userinput></screen></para>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2003-06-03 23:25:25 +01:00
|
|
|
<para>We recommend that you cut-and-paste the above rather than try and type
|
|
|
|
it all in. Or you can edit the specs file by hand if you want to: just replace
|
|
|
|
"/lib/ld-linux.so.2" with "/stage1/lib/ld-linux.so.2".</para>
|
|
|
|
|
|
|
|
<para>This completes the installation of the self-contained toolchain, which
|
|
|
|
can now be used to build the rest of the temporary tools.</para>
|
|
|
|
|
2003-05-02 19:20:20 +01:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|