mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
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:
parent
b920e4019a
commit
d1391f0386
@ -94,6 +94,11 @@
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para></listitem>
|
</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
|
<listitem><para>September 16th, 2003 [greg]: Chapters 5 and 6 - Locking in
|
||||||
Glibc and Re-adjusting the toolchain: Added sanity checks.</para></listitem>
|
Glibc and Re-adjusting the toolchain: Added sanity checks.</para></listitem>
|
||||||
|
|
||||||
|
@ -4,23 +4,20 @@
|
|||||||
|
|
||||||
<para>Now that the temporary C libraries have been installed, we want all
|
<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
|
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
|
libraries. To accomplish this, we need to adjust the linker and the compiler's
|
||||||
compiler's specs file.</para>
|
specs file.</para>
|
||||||
|
|
||||||
<para>First install the adjusted linker scripts by running the following from
|
<para>First install the adjusted linker by running the following from within
|
||||||
within the <filename class="directory">binutils-build</filename>
|
the <filename class="directory">binutils-build</filename> directory:</para>
|
||||||
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
|
<para>The linker was adjusted a little while back, at the end of the first
|
||||||
pass of Binutils, and contain no mention of <filename>/lib</filename>,
|
pass of Binutils. From this point onwards everything will link <emphasis>only
|
||||||
<filename>/usr/lib</filename> or <filename>/usr/local/lib</filename>.
|
</emphasis> against the libraries in <filename>/tools/lib</filename>.</para>
|
||||||
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
|
<para>Now that the adjusted linker is installed, you have to remove the
|
||||||
build and source directories.</para>
|
Binutils build and source directories.</para>
|
||||||
|
|
||||||
<para>The next thing to do is to amend our GCC specs file so that it points
|
<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>
|
to the new dynamic linker. A simple sed will accomplish this:</para>
|
||||||
|
@ -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
|
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>
|
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
|
<para>The first thing to do is to adjust the linker. For this we retained the
|
||||||
retained the source and build directories from the second pass over Binutils.
|
source and build directories from the second pass over Binutils. Install the
|
||||||
Install the adjusted linker scripts by running the following from within the
|
adjusted linker by running the following from within the
|
||||||
<filename class="directory">binutils-build</filename> directory:</para>
|
<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
|
<para>From now on every compiled program will link <emphasis>only</emphasis>
|
||||||
no mention of <filename class="directory">/tools/lib</filename> anymore.
|
against the libraries in <filename>/usr/lib</filename> and <filename>/lib
|
||||||
From now on every compiled program will link <emphasis>only</emphasis>
|
</filename>.</para>
|
||||||
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>
|
<para>You can now remove the Binutils source and build directories.</para>
|
||||||
|
|
||||||
@ -34,14 +32,8 @@ mv newspecfile $SPECFILE
|
|||||||
unset SPECFILE</userinput></screen></para>
|
unset SPECFILE</userinput></screen></para>
|
||||||
|
|
||||||
<para>Again, cutting and pasting the above is recommended. And just like
|
<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
|
before, it is a good idea to check the specs file to ensure the intended
|
||||||
ensure the intended changes were actually made.</para>
|
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>
|
|
||||||
|
|
||||||
<caution><para>It is imperative at this point to stop and ensure that the
|
<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
|
basic functionality of the adjusted toolchain is working as expected. We are
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
<title>Glibc installation</title>
|
<title>Glibc installation</title>
|
||||||
|
|
||||||
<para>The Glibc build system is very well self-contained and will install
|
<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
|
perfectly, even though our compiler specs file and linker are still pointing
|
||||||
pointing at <filename>/tools</filename>. We cannot adjust the specs and
|
at <filename>/tools</filename>. We cannot adjust the specs and linker before
|
||||||
ldscripts before the Glibc install, because the Glibc autoconf tests would then
|
the Glibc install, because the Glibc autoconf tests would then give bogus
|
||||||
give bogus results and thus defeat our goal of achieving a clean build.</para>
|
results and thus defeat our goal of achieving a clean build.</para>
|
||||||
|
|
||||||
<note><para>The testsuite for Glibc in this chapter is considered <emphasis>
|
<note><para>The testsuite for Glibc in this chapter is considered <emphasis>
|
||||||
critical</emphasis>. Do not skip it under any circumstances.</para></note>
|
critical</emphasis>. Do not skip it under any circumstances.</para></note>
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"/usr/share/docbook/docbookx.dtd" [
|
"/usr/share/docbook/docbookx.dtd" [
|
||||||
|
|
||||||
|
|
||||||
<!ENTITY version "20030916">
|
<!ENTITY version "20030917">
|
||||||
<!ENTITY releasedate "September 16th, 2003">
|
<!ENTITY releasedate "September 17th, 2003">
|
||||||
<!ENTITY nbsp " ">
|
<!ENTITY nbsp " ">
|
||||||
|
|
||||||
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
|
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
|
||||||
|
Loading…
Reference in New Issue
Block a user