浏览代码

Restore the use of *startfile_prefix_spec

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7314 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Jeremy Huntwork 19 年之前
父节点
当前提交
1ba726fd6f
共有 4 个文件被更改,包括 30 次插入22 次删除
  1. 9 0
      chapter01/changelog.xml
  2. 5 0
      chapter06/gcc.xml
  3. 14 20
      chapter06/readjusting.xml
  4. 2 2
      general.ent

+ 9 - 0
chapter01/changelog.xml

@@ -36,6 +36,15 @@
     </listitem>
     </listitem>
 -->
 -->
 
 
+    <listitem>
+      <para>January 29, 2006</para>
+      <itemizedlist>
+        <listitem>
+	  <para>[jhuntwork] - Restore the use of *startfile_prefix_spec.
+	</listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
     <listitem>
       <para>January 26, 2006</para>
       <para>January 26, 2006</para>
       <itemizedlist>
       <itemizedlist>

+ 5 - 0
chapter06/gcc.xml

@@ -99,6 +99,11 @@ To support those packages, create this symlink:</para>
 
 
 <screen><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
 <screen><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
 
 
+<para>Many packages use the name <command>cc</command> to call the C
+compiler. To satisfy those packages, create a symlink:</para>
+
+<screen><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
+
 <note><para>At this point, it is strongly recommended to repeat the
 <note><para>At this point, it is strongly recommended to repeat the
 sanity check performed earlier in this chapter. Refer back to <xref
 sanity check performed earlier in this chapter. Refer back to <xref
 linkend="ch-system-readjusting" role=","/> and repeat the check. If the results
 linkend="ch-system-readjusting" role=","/> and repeat the check. If the results

+ 14 - 20
chapter06/readjusting.xml

@@ -19,18 +19,24 @@ be guided from that same <filename class="directory">/tools/lib</filename>
 directory to the LFS <filename class="directory">/{,usr/}lib</filename>
 directory to the LFS <filename class="directory">/{,usr/}lib</filename>
 directories.</para>
 directories.</para>
 
 
-<para>First, create a symlink to the adjusted linker we created in chapter 5.</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>
 
 
-<screen><userinput>ln -sv /tools/bin/ld-new /usr/bin/ld</userinput></screen>
+<screen><userinput>mv -v /tools/bin/{ld,ld-old}
+mv -v /tools/$MACHTYPE/bin/{ld,ld-old}
+mv -v /tools/bin/{ld-new,ld}
+ln -sv /tools/bin/ld /tools/$MACHTYPE/bin/ld</userinput></screen>
 
 
 <para>Next, amend the GCC specs file so that it points to the new
 <para>Next, amend the GCC specs file so that it points to the new
-dynamic linker. A <command>sed</command> command accomplishes this:</para>
+dynamic linker, and so that GCC knows where to find its start files.
+A <command>perl</command> command accomplishes this:</para>
 
 
-<screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp;
-gcc -dumpspecs > $SPECFILE &amp;&amp;
-sed -i -e '/^\*link:$/{n;s,$, -L/usr/lib,}' \
-       -e 's@^/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' $SPECFILE &amp;&amp;
-unset SPECFILE</userinput></screen>
+<screen><userinput>gcc -dumpspecs | \
+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;' &gt; \
+     `dirname $(gcc --print-libgcc-file-name)`/specs
+</userinput></screen>
 
 
 <para>It is a good idea to visually inspect the specs file to verify the intended 
 <para>It is a good idea to visually inspect the specs file to verify the intended 
 change was actually made.</para>
 change was actually made.</para>
@@ -43,18 +49,6 @@ dynamic linker in the above commands. Refer back to <xref
 linkend="ch-tools-toolchaintechnotes" role=","/> if
 linkend="ch-tools-toolchaintechnotes" role=","/> if
 necessary.</para></important>
 necessary.</para></important>
 
 
-<para>Now create a temporary wrapper script for <filename>gcc</filename>.
-This script will point to the real <filename>gcc</filename>
-in <filename class="directory">/tools</filename> but with adjusted parameters
-to ensure that GCC in the next section links to our newly installed Glibc.</para>
-
-<screen><userinput>cat &gt; /usr/bin/gcc &lt;&lt; "EOF"
-#!/bin/bash
-/tools/bin/gcc -B/usr/lib/ -B/usr/bin/ $@
-EOF
-chmod 755 /usr/bin/gcc
-ln -s gcc /usr/bin/cc</userinput></screen>
-
 <caution><para>It is imperative at this point to stop and ensure that
 <caution><para>It is imperative at this point to stop and ensure that
 the basic functions (compiling and linking) of the adjusted toolchain
 the basic functions (compiling and linking) of the adjusted toolchain
 are working as expected. To do this, perform a sanity
 are working as expected. To do this, perform a sanity

+ 2 - 2
general.ent

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20060126">
-<!ENTITY releasedate "January 26, 2006">
+<!ENTITY version "SVN-20060129">
+<!ENTITY releasedate "January 29, 2006">
 <!ENTITY milestone "6.2">
 <!ENTITY milestone "6.2">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->