Author: dj
Date: 2008-10-11 22:09:47 -0600 (Sat, 11 Oct 2008)
New Revision: 8647

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter05/gcc-pass1.xml
Log:
Use static linked gcc for pass 1 - #2056.

Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml  2008-10-12 04:04:01 UTC (rev 8646)
+++ trunk/BOOK/chapter01/changelog.xml  2008-10-12 04:09:47 UTC (rev 8647)
@@ -41,6 +41,10 @@
       <para>2008-10-12</para>
       <itemizedlist>
         <listitem>
+          <para>[dj] - Changed Chapter 5 GCC Pass 1 build to static.  Thanks to
+          Jeremy Huntwork for the suggestion and supporting text.</para>
+        </listitem>
+        <listitem>
           <para>[dj] - Added note to Chapter 6 GCC abuot the new include-fixed
           directory and changed the sample output to match.</para>
         </listitem>

Modified: trunk/BOOK/chapter05/gcc-pass1.xml
===================================================================
--- trunk/BOOK/chapter05/gcc-pass1.xml  2008-10-12 04:04:01 UTC (rev 8646)
+++ trunk/BOOK/chapter05/gcc-pass1.xml  2008-10-12 04:09:47 UTC (rev 8647)
@@ -61,8 +61,8 @@
     <para>Prepare GCC for compilation:</para>
 
 <screen><userinput remap="configure">CC="gcc -B/usr/bin/" 
../gcc-&gcc-version;/configure --prefix=/tools \
-    --with-local-prefix=/tools --disable-nls --enable-shared \
-    --enable-languages=c --disable-decimal-float</userinput></screen>
+    --with-local-prefix=/tools --disable-nls --disable-shared \
+    --enable-languages=c</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -90,14 +90,11 @@
       </varlistentry>
 
       <varlistentry>
-        <term><parameter>--enable-shared</parameter></term>
+        <term><parameter>--disable-shared</parameter></term>
         <listitem>
-          <para>This switch allows the building of <filename
-          class="libraryfile">libgcc_s.so.1</filename> and
-          <filename class="libraryfile">libgcc_eh.a</filename>.
-          Having <filename class="libraryfile">libgcc_eh.a</filename>
-          available ensures that the configure script for Glibc (the
-          next package we compile) produces the proper results.</para>
+          <para>This switch forces gcc to link its internal libraries
+          statically. We do this to avoid possible issues with the host
+          system.</para>
         </listitem>
       </varlistentry>
 
@@ -130,6 +127,17 @@
 
 <screen><userinput remap="install">make install</userinput></screen>
 
+    <para>Using <parameter>--disable-shared</parameter> means that the
+    <filename>libgcc_eh.a</filename> file isn't created and installed. The
+    Glibc package depends on this library as it uses
+    <parameter>-lgcc_eh</parameter> within its build system. We can satisfy
+    that dependency by creating a symlink to <filename>libgcc.a</filename>,
+    since that file will end up containing the objects normally contained in
+    <filename>libgcc_eh.a</filename>.</para>
+
+<screen><userinput remap="install">ln -vs libgcc.a `gcc 
-print-libgcc-file-name | \
+    sed 's/libgcc/&amp;_eh/'`</userinput></screen>
+
     <para>As a finishing touch, create a symlink. Many programs and scripts
     run <command>cc</command> instead of <command>gcc</command>, which is
     used to keep programs generic and therefore usable on all kinds of UNIX

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to