aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Huntwork <jhuntwork@linuxfromscratch.org>2005-07-16 19:24:28 +0000
committerJeremy Huntwork <jhuntwork@linuxfromscratch.org>2005-07-16 19:24:28 +0000
commitf4b803f374bc039f85f23952f01c2fcf922d5613 (patch)
tree7ee2b16c0bc90ac5e9f955cf423c2097cb0e50c4
parentf213c7b381be0fec9c1cad5a754a9eb8fcbe07df (diff)
Fixed chapter 6 readjusting the toolchain sed.
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/gcc4/BOOK@6542 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--chapter01/changelog.xml3
-rw-r--r--chapter06/readjusting.xml7
2 files changed, 6 insertions, 4 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 7255ac73c..19e65fd58 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -112,7 +112,8 @@ First a summary, then a detailed log.</para>
</itemizedlist>
</listitem>
-<listitem><para>July 16th, 2005 [jhuntwork]: Fixed adjusting toolchain sed.</para></listitem>
+<listitem><para>July 16th, 2005 [jhuntwork]: Fixed adjusting toolchain sed for both
+chapters 5 and 6.</para></listitem>
<listitem><para>July 15th, 2005 [matt]: Added a patch to enable tar to build
with gcc-4.0.1</para></listitem>
diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml
index cd7fdfb6b..269e4516b 100644
--- a/chapter06/readjusting.xml
+++ b/chapter06/readjusting.xml
@@ -53,9 +53,10 @@ problem. The above command takes care of this issue.</para>
<para>Next, amend the GCC specs file so that it points to the new
dynamic linker. A <command>perl</command> command accomplishes this:</para>
-<screen><userinput>perl -pi -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g;' \
- -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' \
- `gcc --print-file specs`</userinput></screen>
+<screen><userinput>SPECFILE=`gcc -print-search-dirs | head -n 1 | awk '{ print $2 "specs" }'` &amp;&amp;
+gcc -dumpspecs > $SPECFILE &amp;&amp;
+sed -i -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' $SPECFILE &amp;&amp;
+unset SPECFILE</userinput></screen>
<para>It is a good idea to visually inspect the specs file to verify the intended
change was actually made.</para>