mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 11:21:59 +00:00
Adjust binutils-pass1 so we don't need to hang on to its source directories.
Also use 'gcc -dumpmachine' instead of the MACHTYPE var. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7316 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
b87ea8726b
commit
62d3362b8d
@ -36,15 +36,25 @@
|
||||
</listitem>
|
||||
-->
|
||||
|
||||
<listitem>
|
||||
<para>January 30, 2006</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>[jhuntwork] - Adjust binutils-pass1 so we don't need to hang on to its
|
||||
source directories. Also use 'gcc -dumpmachine' instead of the MACHTYPE var.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>January 29, 2006</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>[jhuntwork] - Restore the use of *startfile_prefix_spec.
|
||||
<para>[jhuntwork] - Restore the use of *startfile_prefix_spec.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>[jhuntwork] - Remove a spurious -i from the perl command when
|
||||
readjusting the toolchain. Thanks Dan Nicholson.
|
||||
readjusting the toolchain. Thanks Dan Nicholson.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
@ -15,27 +15,20 @@
|
||||
these libraries. In order to accomplish this, the linker and the
|
||||
compiler's specs file need to be adjusted.</para>
|
||||
|
||||
<para>The linker, adjusted at the end of the first pass of Binutils,
|
||||
is installed by running the following command from within the
|
||||
<filename class="directory">binutils-build</filename> directory:</para>
|
||||
<para>The linker, adjusted at the end of the first pass of Binutils, needs
|
||||
to be renamed so that it can be properly found and used. First, backup the
|
||||
original linker, then replace it with the adjusted linker. We'll also
|
||||
create a link to its counterpart in <filename class="directory">
|
||||
/tools/$(gcc -dumpmachine)/bin</filename></para>
|
||||
|
||||
<screen><userinput>make -C ld install</userinput></screen>
|
||||
<screen><userinput>mv -v /tools/bin/{ld,ld-old}
|
||||
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
|
||||
mv -v /tools/bin/{ld-new,ld}
|
||||
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen>
|
||||
|
||||
<para>From this point onwards, everything will link only against the
|
||||
libraries in <filename class="directory">/tools/lib</filename>.</para>
|
||||
|
||||
<note>
|
||||
<para>If the earlier warning to retain the Binutils source and
|
||||
build directories from the first pass was missed, ignore the above
|
||||
command. This results in a small chance that the subsequent testing
|
||||
programs will link against libraries on the host. This is not ideal,
|
||||
but it is not a major problem. The situation is corrected when the
|
||||
second pass of Binutils is installed later.</para>
|
||||
</note>
|
||||
|
||||
<para>Now that the adjusted linker is installed, the Binutils build and source
|
||||
directories should be removed.</para>
|
||||
|
||||
<para>The next task is to point GCC to the new dynamic linker. This is done by
|
||||
dumping GCC's <quote>specs</quote> file to a location where GCC will look for it
|
||||
by default. A simple <command>sed</command> substitution then alters the
|
||||
|
@ -105,7 +105,8 @@ cd ../binutils-build</userinput></screen>
|
||||
later on:</para>
|
||||
|
||||
<screen><userinput>make -C ld clean
|
||||
make -C ld LIB_PATH=/tools/lib</userinput></screen>
|
||||
make -C ld LDFLAGS="-s" LIB_PATH=/tools/lib
|
||||
cp -v ld/ld-new /tools/bin</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the make parameters:</title>
|
||||
@ -120,10 +121,12 @@ make -C ld LIB_PATH=/tools/lib</userinput></screen>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term>
|
||||
<term><parameter>-C ld LDFLAGS="-s" LIB_PATH=/tools/lib</parameter></term>
|
||||
<listitem>
|
||||
<para>This option rebuilds everything in the <filename
|
||||
class="directory">ld</filename> subdirectory. Specifying the
|
||||
class="directory">ld</filename> subdirectory. The
|
||||
<envar>LDFLAGS</envar> variable will build a static version of
|
||||
<command>ld</command>. Specifying the
|
||||
<envar>LIB_PATH</envar> Makefile variable on the command line
|
||||
allows us to override the default value and point it to the
|
||||
temporary tools location. The value of this variable specifies
|
||||
@ -134,12 +137,6 @@ make -C ld LIB_PATH=/tools/lib</userinput></screen>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<warning>
|
||||
<para><emphasis>Do not</emphasis> remove the Binutils build and source
|
||||
directories yet. These will be needed again in their current state later
|
||||
in this chapter.</para>
|
||||
</warning>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
|
@ -21,12 +21,12 @@ directories.</para>
|
||||
|
||||
<para>First, backup the <filename class="directory">/tools</filename> linker, and
|
||||
replace it with the adjusted linker we made in chapter 5. We'll also create a
|
||||
link to its counterpart in <filename class="directory">/tools/$MACHTYPE/bin</filename></para>
|
||||
link to its counterpart in <filename class="directory">/tools/$(gcc -dumpmachine)/bin</filename></para>
|
||||
|
||||
<screen><userinput>mv -v /tools/bin/{ld,ld-old}
|
||||
mv -v /tools/$MACHTYPE/bin/{ld,ld-old}
|
||||
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
|
||||
mv -v /tools/bin/{ld-new,ld}
|
||||
ln -sv /tools/bin/ld /tools/$MACHTYPE/bin/ld</userinput></screen>
|
||||
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen>
|
||||
|
||||
<para>Next, amend the GCC specs file so that it points to the new
|
||||
dynamic linker, and so that GCC knows where to find its start files.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!ENTITY version "SVN-20060129">
|
||||
<!ENTITY releasedate "January 29, 2006">
|
||||
<!ENTITY version "SVN-20060130">
|
||||
<!ENTITY releasedate "January 30, 2006">
|
||||
<!ENTITY milestone "6.2">
|
||||
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user