Use static linked gcc for pass 1 - #2056.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8647 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
DJ Lucas 2008-10-12 04:09:47 +00:00
parent 3f39abf3be
commit 0eb906581f
2 changed files with 21 additions and 9 deletions

View File

@ -40,6 +40,10 @@
<listitem> <listitem>
<para>2008-10-12</para> <para>2008-10-12</para>
<itemizedlist> <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> <listitem>
<para>[dj] - Added note to Chapter 6 GCC abuot the new include-fixed <para>[dj] - Added note to Chapter 6 GCC abuot the new include-fixed
directory and changed the sample output to match.</para> directory and changed the sample output to match.</para>

View File

@ -61,8 +61,8 @@ cd ../gcc-build</userinput></screen>
<para>Prepare GCC for compilation:</para> <para>Prepare GCC for compilation:</para>
<screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \ <screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \
--with-local-prefix=/tools --disable-nls --enable-shared \ --with-local-prefix=/tools --disable-nls --disable-shared \
--enable-languages=c --disable-decimal-float</userinput></screen> --enable-languages=c</userinput></screen>
<variablelist> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>
@ -90,14 +90,11 @@ cd ../gcc-build</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--enable-shared</parameter></term> <term><parameter>--disable-shared</parameter></term>
<listitem> <listitem>
<para>This switch allows the building of <filename <para>This switch forces gcc to link its internal libraries
class="libraryfile">libgcc_s.so.1</filename> and statically. We do this to avoid possible issues with the host
<filename class="libraryfile">libgcc_eh.a</filename>. system.</para>
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>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -130,6 +127,17 @@ cd ../gcc-build</userinput></screen>
<screen><userinput remap="install">make install</userinput></screen> <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 <para>As a finishing touch, create a symlink. Many programs and scripts
run <command>cc</command> instead of <command>gcc</command>, which is run <command>cc</command> instead of <command>gcc</command>, which is
used to keep programs generic and therefore usable on all kinds of UNIX used to keep programs generic and therefore usable on all kinds of UNIX