Do "make -C ld install" instead of "make -C ld install-data-local" to install a whole new linker instead of just the new ldscripts.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Greg Schafer 2003-09-17 09:57:52 +00:00
parent b920e4019a
commit d1391f0386
5 changed files with 30 additions and 36 deletions

View File

@ -94,6 +94,11 @@
</itemizedlist>
</para></listitem>
<listitem><para>September 17th, 2003 [greg]: Chapters 5 and 6 - Locking in
Glibc and Re-adjusting the toolchain: Do "make -C ld install" instead of "make
-C ld install-data-local" to install a whole new linker instead of just the
new ldscripts.</para></listitem>
<listitem><para>September 16th, 2003 [greg]: Chapters 5 and 6 - Locking in
Glibc and Re-adjusting the toolchain: Added sanity checks.</para></listitem>

View File

@ -4,23 +4,20 @@
<para>Now that the temporary C libraries have been installed, we want all
the tools compiled in the rest of this chapter to be linked against these
libraries. To accomplish this, we need to adjust the linker's scripts and the
compiler's specs file.</para>
libraries. To accomplish this, we need to adjust the linker and the compiler's
specs file.</para>
<para>First install the adjusted linker scripts by running the following from
within the <filename class="directory">binutils-build</filename>
directory:</para>
<para>First install the adjusted linker by running the following from within
the <filename class="directory">binutils-build</filename> directory:</para>
<para><screen><userinput>make -C ld install-data-local</userinput></screen></para>
<para><screen><userinput>make -C ld install</userinput></screen></para>
<para>These scripts were adjusted a little while back, at the end of the first
pass of Binutils, and 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>/tools/lib</filename>.</para>
<para>The linker was adjusted a little while back, at the end of the first
pass of Binutils. From this point onwards everything will link <emphasis>only
</emphasis> against the libraries in <filename>/tools/lib</filename>.</para>
<para>Now that the scripts are adjusted, you have to remove the Binutils
build and source directories.</para>
<para>Now that the adjusted linker is installed, you have to remove the
Binutils build and source directories.</para>
<para>The next 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>

View File

@ -7,18 +7,16 @@ our toolchain. We'll adjust it so that it will link any newly compiled program
against the new C libraries. Basically, this is the reverse of what we did
in the "Locking in" stage in the beginning of the previous chapter.</para>
<para>The first thing to do is to adjust the linker scripts. For this we
retained the source and build directories from the second pass over Binutils.
Install the adjusted linker scripts by running the following from within the
<para>The first thing to do is to adjust the linker. For this we retained the
source and build directories from the second pass over Binutils. Install the
adjusted linker by running the following from within the
<filename class="directory">binutils-build</filename> directory:</para>
<para><screen><userinput>make -C ld install-data-local</userinput></screen></para>
<para><screen><userinput>make -C ld install</userinput></screen></para>
<para>The linker scripts now contain
no mention of <filename class="directory">/tools/lib</filename> anymore.
From now on every compiled program will link <emphasis>only</emphasis>
against the libraries in <filename>/usr/lib</filename> and
<filename>/lib</filename>.</para>
<para>From now on every compiled program will link <emphasis>only</emphasis>
against the libraries in <filename>/usr/lib</filename> and <filename>/lib
</filename>.</para>
<para>You can now remove the Binutils source and build directories.</para>
@ -34,14 +32,8 @@ mv newspecfile $SPECFILE
unset SPECFILE</userinput></screen></para>
<para>Again, cutting and pasting the above is recommended. And just like
before, it is a good idea to check the linker scripts and the specs file to
ensure the intended changes were actually made.</para>
<para>Note that the linker scripts will still contain a reference to
<filename class="directory">/tools/i686-pc-linux-gnu/lib</filename>. This
is unavoidable, but luckily does not present a problem. There are no
libraries in that location as all the temporary tools libraries are
located in <filename class="directory">/tools/lib</filename>.</para>
before, it is a good idea to check the specs file to ensure the intended
changes were actually made.</para>
<caution><para>It is imperative at this point to stop and ensure that the
basic functionality of the adjusted toolchain is working as expected. We are

View File

@ -4,10 +4,10 @@
<title>Glibc installation</title>
<para>The Glibc build system is very well self-contained and will install
perfectly, even though our compiler specs file and linker scripts are still
pointing at <filename>/tools</filename>. We cannot adjust the specs and
ldscripts before the Glibc install, because the Glibc autoconf tests would then
give bogus results and thus defeat our goal of achieving a clean build.</para>
perfectly, even though our compiler specs file and linker are still pointing
at <filename>/tools</filename>. We cannot adjust the specs and linker before
the Glibc install, because the Glibc autoconf tests would then give bogus
results and thus defeat our goal of achieving a clean build.</para>
<note><para>The testsuite for Glibc in this chapter is considered <emphasis>
critical</emphasis>. Do not skip it under any circumstances.</para></note>

View File

@ -3,8 +3,8 @@
"/usr/share/docbook/docbookx.dtd" [
<!ENTITY version "20030916">
<!ENTITY releasedate "September 16th, 2003">
<!ENTITY version "20030917">
<!ENTITY releasedate "September 17th, 2003">
<!ENTITY nbsp " ">
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">