aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorMatthew Burgess <matthew@linuxfromscratch.org>2005-09-09 20:34:44 +0000
committerMatthew Burgess <matthew@linuxfromscratch.org>2005-09-09 20:34:44 +0000
commit2e02c35ad71fcbd0b932edf49eb9a8d5e49179b1 (patch)
treee5a6a1882b04b9bf8d427bc3dfa27398b38f3b46 /chapter06
parent98fe721a0601f13d3659b84ef88fd788418491dc (diff)
Upgrade to gcc-4.0.1 (merge of gcc4 branch)
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@6819 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/gcc.xml19
-rw-r--r--chapter06/glibc.xml31
-rw-r--r--chapter06/grub.xml9
-rw-r--r--chapter06/inetutils.xml4
-rw-r--r--chapter06/kbd.xml5
-rw-r--r--chapter06/readjusting.xml9
-rw-r--r--chapter06/tar.xml5
7 files changed, 54 insertions, 28 deletions
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index 4c13eed95..de204c1f4 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -38,17 +38,6 @@ variables that override default optimizations have been defined, such
as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
unset them when building GCC.</para>
-<para>Apply only the No-Fixincludes patch (not the Specs patch) also
-used in the previous chapter:</para>
-
-<screen><userinput>patch -Np1 -i ../&gcc-no_fixincludes-patch;</userinput></screen>
-
-<para>GCC fails to compile some packages outside of a base Linux From Scratch
-install (e.g., Mozilla and kdegraphics) when used in conjunction with newer
-versions of Binutils. Apply the following patch to fix this issue:</para>
-
-<screen><userinput>patch -Np1 -i ../&gcc-linkonce-patch;</userinput></screen>
-
<para>Apply a <command>sed</command> substitution that will suppress the
installation of <filename class="libraryfile">libiberty.a</filename>. The
version of <filename class="libraryfile">libiberty.a</filename> provided by
@@ -56,6 +45,14 @@ Binutils will be used instead:</para>
<screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
+<para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/>
+built GCC with the <option>-fomit-frame-pointer</option> compiler flag.
+Non-bootstrap builds omit this flag by default, so apply the following
+<command>sed</command> to use it in order to ensure consistent compiler builds.
+</para>
+
+<screen><userinput>sed -i 's/^XCFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in</userinput></screen>
+
<para>The GCC documentation recommends building GCC outside of the source
directory in a dedicated build directory:</para>
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index 653b4280c..a0f3b4277 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -20,7 +20,7 @@ arithmetic, and so on.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
-<seglistitem><seg>12.3 SBU</seg><seg>476</seg></seglistitem>
+<seglistitem><seg>16.7 SBU</seg><seg>500</seg></seglistitem>
</segmentedlist>
<segmentedlist>
@@ -68,6 +68,19 @@ C library or the kernel. This patch fixes the problem:</para>
<screen><userinput>patch -Np1 -i ../&glibc-testfix-patch;</userinput></screen>
+<para>Apply the following patches to enable Glibc to compile with
+GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&glibc-gcc4_symbols-patch;
+patch -Np1 -i ../&glibc-gcc4_string-patch;
+patch -Np1 -i ../&glibc-gcc4_elf-patch;
+patch -Np1 -i ../&glibc-gcc4_iconvdata-patch;</userinput></screen>
+
+<para>The following patch corrects the expected results for some of the math
+tests on x86 processors when compiled with GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&glibc-gcc4_mathtest-patch;</userinput></screen>
+
<para>The Glibc documentation recommends building Glibc outside of the source
directory in a dedicated build directory:</para>
@@ -102,16 +115,24 @@ circumstance.</para></important>
<para>Test the results:</para>
-<screen><userinput>make check</userinput></screen>
+<screen><userinput>
+make -k check &gt;glibc-check-log 2&gt;&amp;1 ; grep Error glibc-check-log
+</userinput></screen>
+
+<para>On at least i686 you can expect to see failures in the <emphasis>test-double
+</emphasis> and <emphasis>test-idouble</emphasis> math tests with
+gcc-&gcc-version;, as well as an expected (ignored) failure in <emphasis>
+posix/annexc</emphasis>. These two failures in the math tests appear to be
+harmless.</para>
<para>The Glibc test suite is highly dependent on certain functions of
-the host system, in particular the kernel. In general, the Glibc test
-suite is always expected to pass. However, in certain circumstances,
+the host system, in particular the kernel. In certain circumstances,
some failures are unavoidable. This is a list of the most common
issues:</para>
<itemizedlist>
-<listitem><para>The <emphasis>math</emphasis> tests sometimes fail when running
+<listitem><para>The <emphasis>math</emphasis> tests sometimes fail in other tests
+when running
on systems where the CPU is not a relatively new genuine Intel or authentic AMD.
Certain optimization settings are also known to be a factor here.</para></listitem>
diff --git a/chapter06/grub.xml b/chapter06/grub.xml
index 1e852896a..141e3bff6 100644
--- a/chapter06/grub.xml
+++ b/chapter06/grub.xml
@@ -46,14 +46,7 @@ unset them when building GRUB.</para>
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>sed -i '/ufs2/d' stage2/size_test &amp;&amp;
-make check</userinput>.</para>
-
-<para>The UFS test is known to fail due to a compiler issue. The failure
-prevents the rest of the tests from being run, so the <command>sed</command>
-command is used to avoid the failure. The UFS test failure can be ignored
-unless you plan to boot from a UFS partition. The partitions are normally only
-used by Sun workstations.</para>
+<userinput>make check</userinput>.</para>
<para>Install the package:</para>
diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml
index 1ddb547fb..c8251c5c2 100644
--- a/chapter06/inetutils.xml
+++ b/chapter06/inetutils.xml
@@ -30,6 +30,10 @@ Diffutils, GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
<sect2 role="installation">
<title>Installation of Inetutils</title>
+<para>Apply a patch to Inetutils to enable it to compile with GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&inetutils-gcc4_fixes-patch;</userinput></screen>
+
<para>All programs that come with Inetutils will not be installed.
However, the Inetutils build system will insist on installing all the
man pages anyway. The following patch will correct this
diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml
index 70a5980fe..1e71570be 100644
--- a/chapter06/kbd.xml
+++ b/chapter06/kbd.xml
@@ -30,6 +30,11 @@ Diffutils, Flex, GCC, Gettext, Glibc, Grep, Gzip, M4, Make, and Sed</seg></segli
<sect2 role="installation">
<title>Installation of Kbd</title>
+<para>Patch Kbd to fix a bug in <command>setfont</command> that is triggered
+when compiling with GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&kbd-gcc4_fixes-patch;</userinput></screen>
+
<para>Prepare Kbd for compilation:</para>
<screen><userinput>./configure</userinput></screen>
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>
diff --git a/chapter06/tar.xml b/chapter06/tar.xml
index c8c2c661d..938bd50ff 100644
--- a/chapter06/tar.xml
+++ b/chapter06/tar.xml
@@ -30,6 +30,11 @@ Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
<sect2 role="installation">
<title>Installation of Tar</title>
+<para>Apply a patch to fix some issues with the test suite when using
+GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&tar-gcc4_fix-patch;</userinput></screen>
+
<para>Tar has a bug when the <parameter>-S</parameter> option is used
with files larger than 4 GB. The following patch properly fixes this issue:</para>