aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/readjusting.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/readjusting.xml')
-rw-r--r--chapter06/readjusting.xml9
1 files changed, 5 insertions, 4 deletions
diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml
index 760f35cb0..7c11d9333 100644
--- a/chapter06/readjusting.xml
+++ b/chapter06/readjusting.xml
@@ -51,11 +51,12 @@ problem. The above command takes care of this issue.</para>
<para>Remove the Binutils source and build directories now.</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>
+dynamic linker. A <command>sed</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-name=specs`</userinput></screen>
+<screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp;
+gcc -dumpspecs > $SPECFILE &amp;&amp;
+sed -i '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>