Bug #33 (GCC 3.3)

Zack Winkles winkie at linuxfromscratch.org
Wed May 14 15:01:31 PDT 2003


The book patch is attached, as well as the GCC patches ported to GCC
3.3, and a few misc. other things needed to use GCC 3.3.
-------------- next part --------------
diff -Naur lfs-book.orig/appendixa/binutils-down.xml lfs-book/appendixa/binutils-down.xml
--- lfs-book.orig/appendixa/binutils-down.xml	2002-05-11 09:26:17.000000000 -0400
+++ lfs-book/appendixa/binutils-down.xml	2003-05-14 17:56:37.982880976 -0400
@@ -2,6 +2,9 @@
 <title>Official Download Location</title>
 
 <para><literallayout>Binutils (&binutils-version;): 
-<ulink url="ftp://ftp.gnu.org/gnu/binutils/"/></literallayout></para>
+<ulink url="ftp://ftp.gnu.org/gnu/binutils/"/>
+
+Binutils Library Path Patch (&binutils-patch-version;):
+<ulink url="&http;/binutils-&binutils-patch-version;-lib-path.patch"/></literallayout></para>
 </sect2>
 
diff -Naur lfs-book.orig/appendixa/findutils-down.xml lfs-book/appendixa/findutils-down.xml
--- lfs-book.orig/appendixa/findutils-down.xml	2003-05-12 19:26:06.000000000 -0400
+++ lfs-book/appendixa/findutils-down.xml	2003-05-14 16:31:01.000000000 -0400
@@ -2,6 +2,6 @@
 <title>Official Download Location</title>
 
 <para><literallayout>Findutils (&findutils-version;):
-<ulink url="ftp://ftp.gnu.org/gnu/findutils/"/></literallayout></para>
+<ulink url="http://netsw.org/system/tools/fileutils/find/"/></literallayout></para>
 
 </sect2>
diff -Naur lfs-book.orig/appendixa/glibc-down.xml lfs-book/appendixa/glibc-down.xml
--- lfs-book.orig/appendixa/glibc-down.xml	2003-01-02 19:21:10.000000000 -0500
+++ lfs-book/appendixa/glibc-down.xml	2003-05-14 16:47:46.000000000 -0400
@@ -4,12 +4,7 @@
 <para><literallayout>Glibc (&glibc-version;): 
 <ulink url="ftp://ftp.gnu.org/gnu/glibc/"/>
 
-Glibc-linuxthreads (&glibc-version;): 
-<ulink url="ftp://ftp.gnu.org/gnu/glibc/"/>
-
-Glibc Root/Perl Patch (&glibc-rootperl-patch-version;):
-<ulink url="&http;/"/>
+Glibc (&glibc-gcc-patch-version;):
+<ulink url="&http;/glibc-&glibc-gcc-patch-version;.patch"/></literallayout></para>
 
-Glibc Libnss Patch (&glibc-libnss-patch-version;):
-<ulink url="&http;/"/></literallayout></para>
 </sect2>
diff -Naur lfs-book.orig/appendixa/psmisc-down.xml lfs-book/appendixa/psmisc-down.xml
--- lfs-book.orig/appendixa/psmisc-down.xml	2002-05-11 09:26:17.000000000 -0400
+++ lfs-book/appendixa/psmisc-down.xml	2003-05-14 17:37:01.000000000 -0400
@@ -3,5 +3,8 @@
 
 <para><literallayout>Psmisc (&psmisc-version;):
 <ulink url="http://download.sourceforge.net/psmisc/"/>
-<ulink url="ftp://download.sourceforge.net/pub/sourceforge/psmisc/"/></literallayout></para>
+<ulink url="ftp://download.sourceforge.net/pub/sourceforge/psmisc/"/>
+
+<ulink url="&http;/psmisc-&psmisc-patch-version;.patch"/></literallayout></para>
+
 </sect2>
diff -Naur lfs-book.orig/appendixa/zlib-down.xml lfs-book/appendixa/zlib-down.xml
--- lfs-book.orig/appendixa/zlib-down.xml	2003-05-11 11:18:55.000000000 -0400
+++ lfs-book/appendixa/zlib-down.xml	2003-05-14 16:46:56.000000000 -0400
@@ -7,6 +7,5 @@
 <ulink url="http://www.gzip.org/zlib/"/>
 
 Zlib Patch (&zlib-version;):
-<ulink url="&ftp;/"/>
-<ulink url="&http;/"/></literallayout></para>
+<ulink url="&http;/zlib-&zlib-patch-version;.patch"/></literallayout></para>
 </sect2>
diff -Naur lfs-book.orig/chapter01/changelog.xml lfs-book/chapter01/changelog.xml
--- lfs-book.orig/chapter01/changelog.xml	2003-05-13 17:05:13.000000000 -0400
+++ lfs-book/chapter01/changelog.xml	2003-05-14 17:47:49.189269824 -0400
@@ -10,11 +10,12 @@
 <itemizedlist>
 <listitem><para>automake-1.7.4</para></listitem>
 <listitem><para>bash-2.05b</para></listitem>
+<listitem><para>binutils-2.13.2.1</para></listitem>
 <listitem><para>e2fsprogs-1.33</para></listitem>
 <listitem><para>file-4.02</para></listitem>
 <listitem><para>findutils-4.1.7</para></listitem>
 <listitem><para>gawk-3.1.2</para></listitem>
-<listitem><para>gcc-3.2.3</para></listitem>
+<listitem><para>gcc-3.3</para></listitem>
 <listitem><para>glibc-2.3.2</para></listitem>
 <listitem><para>grep-2.5.1</para></listitem>
 <listitem><para>groff-1.19</para></listitem>
@@ -49,13 +50,16 @@
 <listitem><para>gawk-3.1.2.patch</para></listitem>
 <listitem><para>gcc-2.95.3</para></listitem>
 <listitem><para>gcc-2.95.3-2.patch</para></listitem>
-<listitem><para>gcc-3.2.3-mmap_test.patch</para></listitem>
-<listitem><para>gcc-3.2.3-no_fixincludes.patch</para></listitem>
-<listitem><para>gcc-3.2.3-specs-4.patch</para></listitem>
+<listitem><para>gcc-3.3-mmap_test.patch</para></listitem>
+<listitem><para>gcc-3.3-no_fixincludes.patch</para></listitem>
+<listitem><para>gcc-3.3-specs.patch</para></listitem>
+<listitem><para>glibc-2.3.2-gcc33.patch</para></listitem>
 <listitem><para>inetutils-1.4.2</para></listitem>
 <listitem><para>lfs-utils-0.2.2</para></listitem>
-<listitem><para>ncurses-5.3-etip.patch</para></listitem>
+<listitem><para>ncurses-5.3-etip-2.patch</para></listitem>
+<listitem><para>ncurses-5.3-vsscanf.patch</para></listitem>
 <listitem><para>perl-5.8.0-libc.patch</para></listitem>
+<listitem><para>psmisc-21.2.patch</para></listitem>
 <listitem><para>tcl-8.4.2</para></listitem>
 <listitem><para>zlib-1.1.4-vsnprintf.patch</para></listitem>
 </itemizedlist>
@@ -78,6 +82,9 @@
 </itemizedlist>
 </para></listitem>
 
+<listitem><para>May 14th, 2003 [winkie]: Upgraded to GCC 3.3 and
+Binutils 2.13.2.1. Closes bug #33.</para></listitem>
+
 <listitem><para>May 13th, 2003 [gerard]: Chapter 06: When we
 <userinput>exec /path/to/bash --login</userinput>, also run <userinput>set
 +h</userinput> to keep the hashing option turned off. Fixes bug
diff -Naur lfs-book.orig/chapter04/gcc-patch.xml lfs-book/chapter04/gcc-patch.xml
--- lfs-book.orig/chapter04/gcc-patch.xml	2003-05-11 20:51:16.000000000 -0400
+++ lfs-book/chapter04/gcc-patch.xml	2003-05-14 16:38:12.000000000 -0400
@@ -1,8 +1,8 @@
 GCC Specs Patch:
-<ulink url="&http;/gcc-3.2.3-specs-4.patch"/>
+<ulink url="&http;/gcc-&gcc-specs-patch-version;.patch"/>
 
 GCC MMap Test Patch:
-<ulink url="&http;/gcc-3.2.3-mmap_test.patch"/>
+<ulink url="&http;/gcc-&gcc-mmaptest-patch-version;.patch"/>
 
 GCC No Fixincludes Patch:
-<ulink url="&http;/gcc-3.2.3-no_fixincludes.patch"/>
+<ulink url="&http;/gcc-&gcc-nofixincl-patch-version;.patch"/>
diff -Naur lfs-book.orig/chapter04/glibc-patch.xml lfs-book/chapter04/glibc-patch.xml
--- lfs-book.orig/chapter04/glibc-patch.xml	2003-01-02 19:21:10.000000000 -0500
+++ lfs-book/chapter04/glibc-patch.xml	2003-05-14 16:43:44.000000000 -0400
@@ -1,5 +1,2 @@
-Glibc Root/Perl Patch: (&glibc-rootperl-patch-version;) - &glibc-rootperl-patch-size;:
-<ulink url="&http;/glibc-&glibc-rootperl-patch-version;-root-perl.patch"/>
-
-Glibc Libnss  Patch: (&glibc-libnss-patch-version;) - &glibc-libnss-patch-size;:
-<ulink url="&http;/glibc-&glibc-libnss-patch-version;-libnss.patch"/>
+Glibc GCC 3.3 Patch: (&glibc-gcc-patch-version;) - &glibc-gcc-patch-size;:
+<ulink url="&http;/glibc-&glibc-gcc-patch-version;.patch"/>
diff -Naur lfs-book.orig/chapter04/ncurses-patch.xml lfs-book/chapter04/ncurses-patch.xml
--- lfs-book.orig/chapter04/ncurses-patch.xml	2003-05-07 19:39:25.000000000 -0400
+++ lfs-book/chapter04/ncurses-patch.xml	2003-05-14 17:43:14.696998992 -0400
@@ -1,5 +1,5 @@
-Ncurses Patch (&ncurses-etip-patch-version;) - &ncurses-etip-patch-size;:
-<ulink url="&http;/ncurses-5.3-etip-2.patch"/>
+Ncurses Etip Patch (&ncurses-etip-patch-version;) - &ncurses-etip-patch-size;:
+<ulink url="&http;/ncurses-&ncurses-etip-patch-version;.patch"/>
 
-Ncurses Patch (&ncurses-etip-patch-version;) - &ncurses-etip-patch-size;:
-<ulink url="&http;/ncurses-5.3-vsscanf.patch"/>
+Ncurses Vsscanf Patch (&ncurses-vsscanf-patch-version;) - &ncurses-vsscanf-patch-size;:
+<ulink url="&http;/ncurses-&ncurses-vsscanf-patch-version;.patch"/>
diff -Naur lfs-book.orig/chapter04/packages.xml lfs-book/chapter04/packages.xml
--- lfs-book.orig/chapter04/packages.xml	2003-05-12 19:26:06.000000000 -0400
+++ lfs-book/chapter04/packages.xml	2003-05-14 17:35:31.000000000 -0400
@@ -33,6 +33,7 @@
 &c4-gettext;
 &c4-glibc;
 &c4-glibc-threads;
+&c4-glibc-patch;
 &c4-grep;
 &c4-groff;
 &c4-gzip;
@@ -61,6 +62,7 @@
 &c4-procps;
 &c4-procps-patch;
 &c4-psmisc;
+&c4-psmisc-patch;
 &c4-sed;
 &c4-shadowpwd;
 &c4-sysklogd;
diff -Naur lfs-book.orig/chapter04/psmisc-patch.xml lfs-book/chapter04/psmisc-patch.xml
--- lfs-book.orig/chapter04/psmisc-patch.xml	1969-12-31 19:00:00.000000000 -0500
+++ lfs-book/chapter04/psmisc-patch.xml	2003-05-14 17:35:20.000000000 -0400
@@ -0,0 +1,2 @@
+Psmisc Patch: (&psmisc-patch-version;) - &psmisc-patch-size;:
+<ulink url="&http;/psmisc-&psmisc-patch-version;.patch"/>
diff -Naur lfs-book.orig/chapter05/binutils-pass2-inst.xml lfs-book/chapter05/binutils-pass2-inst.xml
--- lfs-book.orig/chapter05/binutils-pass2-inst.xml	2003-05-10 22:44:11.000000000 -0400
+++ lfs-book/chapter05/binutils-pass2-inst.xml	2003-05-14 17:51:38.897348888 -0400
@@ -3,7 +3,7 @@
 <sect2>
 <title>Installation of Binutils</title>
 
-<para><screen><userinput>patch -Np1 -i ../binutils-&binutils-version;-lib-path.patch
+<para><screen><userinput>patch -Np1 -i ../binutils-&binutils-patch-version;-lib-path.patch
 mkdir ../binutils-build
 cd ../binutils-build
 ../binutils-&binutils-version;/configure --prefix=/stage1 \
diff -Naur lfs-book.orig/chapter05/gcc-pass1-inst.xml lfs-book/chapter05/gcc-pass1-inst.xml
--- lfs-book.orig/chapter05/gcc-pass1-inst.xml	2003-05-10 19:48:25.000000000 -0400
+++ lfs-book/chapter05/gcc-pass1-inst.xml	2003-05-14 16:39:51.000000000 -0400
@@ -12,8 +12,7 @@
 default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
 or modifying them when building GCC.</para>
 
-<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
-patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch</userinput></screen></para>
+<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-mmaptest-patch-version;.patch</userinput></screen></para>
 
 <para>It is recommended by the GCC installation documentation to build
 GCC outside of the source directory in a dedicated directory:</para>
diff -Naur lfs-book.orig/chapter05/gcc-pass2-inst.xml lfs-book/chapter05/gcc-pass2-inst.xml
--- lfs-book.orig/chapter05/gcc-pass2-inst.xml	2003-05-12 16:19:03.000000000 -0400
+++ lfs-book/chapter05/gcc-pass2-inst.xml	2003-05-14 17:56:53.202567232 -0400
@@ -3,9 +3,9 @@
 <sect2>
 <title>Installation of GCC</title>
 
-<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-specs-version;.patch
-patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
-patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch</userinput></screen></para>
+<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-specs-patch-version;.patch
+patch -Np1 -i ../gcc-&gcc-mmaptest-patch-version;.patch
+patch -Np1 -i ../gcc-&gcc-nofixincl-patch-version;.patch</userinput></screen></para>
 
 <para><screen><userinput>mkdir ../gcc-build
 cd ../gcc-build</userinput></screen></para>
diff -Naur lfs-book.orig/chapter05/glibc-inst.xml lfs-book/chapter05/glibc-inst.xml
--- lfs-book.orig/chapter05/glibc-inst.xml	2003-05-13 17:05:13.000000000 -0400
+++ lfs-book/chapter05/glibc-inst.xml	2003-05-14 16:26:28.000000000 -0400
@@ -17,6 +17,8 @@
 <para>Basically, compiling Glibc in any other way than the book suggests
 is putting your system at a very high risk.</para>
 
+<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-gcc-patch-version;.patch</userinput></screen></para>
+
 <para>The documentation that comes with Glibc recommends to build the package
 not in the source directory but in a separate, dedicated directory:</para>
 
diff -Naur lfs-book.orig/chapter06/gcc-inst.xml lfs-book/chapter06/gcc-inst.xml
--- lfs-book.orig/chapter06/gcc-inst.xml	2003-05-13 17:05:13.000000000 -0400
+++ lfs-book/chapter06/gcc-inst.xml	2003-05-14 17:57:01.480308824 -0400
@@ -14,8 +14,8 @@
 available in the full gcc package; instructions for building them may be
 found at <ulink url="&blfs-root;view/cvs/general/gcc.html"/>.</para>
 
-<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch
-patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch</userinput></screen></para>
+<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-nofixincl-patch-version;.patch
+patch -Np1 -i ../gcc-&gcc-mmaptest-patch-version;.patch</userinput></screen></para>
 
 <para>It is recommended by the GCC installation documentation to build GCC
 in a dedicated directory outside of the source tree. Create the build
diff -Naur lfs-book.orig/chapter06/glibc-inst.xml lfs-book/chapter06/glibc-inst.xml
--- lfs-book.orig/chapter06/glibc-inst.xml	2003-05-13 17:05:13.000000000 -0400
+++ lfs-book/chapter06/glibc-inst.xml	2003-05-14 17:24:35.000000000 -0400
@@ -3,6 +3,8 @@
 <sect2>
 <title>Glibc installation</title>
 
+<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-gcc-patch-version;.patch</userinput></screen></para>
+
 <para>The documentation that comes with Glibc recommends to build the package
 not in the source directory but in a separate, dedicated directory:</para>
 
diff -Naur lfs-book.orig/chapter06/psmisc-inst.xml lfs-book/chapter06/psmisc-inst.xml
--- lfs-book.orig/chapter06/psmisc-inst.xml	2003-01-30 00:06:58.000000000 -0500
+++ lfs-book/chapter06/psmisc-inst.xml	2003-05-14 17:37:47.000000000 -0400
@@ -3,6 +3,10 @@
 <sect2>
 <title>Installation of Psmisc</title>
 
+<para>Patch Psmisc so that it will compile with GCC 3.3:</para>
+
+<para><screen><userinput>patch -Np1 -i ../psmisc-&psmisc-patch-version;.patch</userinput></screen></para>
+
 <para>Prepare Psmisc to be compiled:</para>
 
 <para><screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen></para>
diff -Naur lfs-book.orig/entities/binutils.ent lfs-book/entities/binutils.ent
--- lfs-book.orig/entities/binutils.ent	2003-05-02 16:36:04.000000000 -0400
+++ lfs-book/entities/binutils.ent	2003-05-14 17:54:51.057136160 -0400
@@ -15,7 +15,7 @@
 <!ENTITY aa-binutils-dep SYSTEM "../appendixa/binutils-dep.xml">
 <!ENTITY aa-binutils-down SYSTEM "../appendixa/binutils-down.xml">
 
-<!ENTITY binutils-version "2.13.2">
+<!ENTITY binutils-version "2.13.2.1">
 <!ENTITY binutils-depversion "2.11.2">
 <!ENTITY binutils-contversion "2.12.1">
 <!ENTITY binutils-size "9,534 KB">
diff -Naur lfs-book.orig/entities/gcc.ent lfs-book/entities/gcc.ent
--- lfs-book.orig/entities/gcc.ent	2003-05-12 16:19:03.000000000 -0400
+++ lfs-book/entities/gcc.ent	2003-05-14 16:37:28.000000000 -0400
@@ -16,18 +16,19 @@
 <!ENTITY aa-gcc-dep SYSTEM "../appendixa/gcc-dep.xml">
 <!ENTITY aa-gcc-down SYSTEM "../appendixa/gcc-down.xml">
 
-<!ENTITY gcc-version "3.2.3">
-<!ENTITY gcc-specs-version "3.2.3-specs-4">
+<!ENTITY gcc-version "3.3">
 <!ENTITY gcc-depversion "2.95.3">
 <!ENTITY gcc-contversion "3.1">
-<!ENTITY gcc-core-size "13,140 KB">
-<!ENTITY gcc-g-size "2520 KB">
-<!ENTITY gcc-patch-version "3.2.1">
-<!ENTITY gcc-patch-size "4 KB">
+<!ENTITY gcc-core-size "14,352 KB">
+<!ENTITY gcc-g-size "2,677 KB">
 <!ENTITY gcc-core-package "gcc-core-&gcc-version;.tar.bz2">
 <!ENTITY gcc-g-package "gcc-g++-&gcc-version;.tar.bz2">
 <!ENTITY gcc-dir "gcc-&gcc-version;">
 
+<!ENTITY gcc-specs-patch-version "3.3-specs">
+<!ENTITY gcc-mmaptest-patch-version "3.3-mmap_test">
+<!ENTITY gcc-nofixincl-patch-version "3.3-no_fixincludes">
+
 <!ENTITY gcc-compsize-pass1-stage1 "326 MB">
 <!ENTITY gcc-time-pass1-stage1 "9.48 SBU">
 
diff -Naur lfs-book.orig/entities/glibc.ent lfs-book/entities/glibc.ent
--- lfs-book.orig/entities/glibc.ent	2003-05-07 19:41:42.000000000 -0400
+++ lfs-book/entities/glibc.ent	2003-05-14 16:25:26.000000000 -0400
@@ -21,10 +21,8 @@
 <!ENTITY glibc-size "17,463 KB">
 <!ENTITY glibc-threads-size "238 KB">
 
-<!ENTITY glibc-rootperl-patch-size "1 KB">
-<!ENTITY glibc-rootperl-patch-version "2.3.1">
-<!ENTITY glibc-libnss-patch-size "1 KB">
-<!ENTITY glibc-libnss-patch-version "2.3.1">
+<!ENTITY glibc-gcc-patch-size "1 KB">
+<!ENTITY glibc-gcc-patch-version "2.3.2-gcc33">
 
 <!ENTITY glibc-dir "glibc-&glibc-version;">
 <!ENTITY glibc-threads-dir "linuxthreads, linuxthreads_db">
diff -Naur lfs-book.orig/entities/ncurses.ent lfs-book/entities/ncurses.ent
--- lfs-book.orig/entities/ncurses.ent	2003-05-02 16:36:04.000000000 -0400
+++ lfs-book/entities/ncurses.ent	2003-05-14 17:42:54.064135664 -0400
@@ -17,8 +17,10 @@
 <!ENTITY ncurses-depversion "5.2">
 <!ENTITY ncurses-contversion "5.2">
 <!ENTITY ncurses-size "2,019 KB">
-<!ENTITY ncurses-etip-patch-version "5.3">
+<!ENTITY ncurses-etip-patch-version "5.3-etip-2">
 <!ENTITY ncurses-etip-patch-size "1 KB">
+<!ENTITY ncurses-vsscanf-patch-version "5.3-vsscanf">
+<!ENTITY ncurses-vsscanf-patch-size "1 KB">
 <!ENTITY ncurses-dir "ncurses-&ncurses-version;">
 <!ENTITY ncurses-package "ncurses-&ncurses-version;.tar.bz2">
 
diff -Naur lfs-book.orig/entities/psmisc.ent lfs-book/entities/psmisc.ent
--- lfs-book.orig/entities/psmisc.ent	2003-01-16 22:58:39.000000000 -0500
+++ lfs-book/entities/psmisc.ent	2003-05-14 17:39:48.000000000 -0400
@@ -1,4 +1,5 @@
 <!ENTITY c4-psmisc SYSTEM "../chapter04/psmisc.xml">
+<!ENTITY c4-psmisc-patch SYSTEM "../chapter04/psmisc-patch.xml">
 
 <!ENTITY c6-psmisc SYSTEM "../chapter06/psmisc.xml">
 <!ENTITY c6-psmisc-inst SYSTEM "../chapter06/psmisc-inst.xml">
@@ -15,6 +16,8 @@
 <!ENTITY psmisc-size "253 KB">
 <!ENTITY psmisc-dir "psmisc-&psmisc-version;">
 <!ENTITY psmisc-package "psmisc-&psmisc-version;.tar.bz2">
+<!ENTITY psmisc-patch-version "21.2">
+<!ENTITY psmisc-patch-size "1 KB">
 
 <!ENTITY psmisc-compsize "2 MB">
 <!ENTITY psmisc-time "0.11 SBU">
-------------- next part --------------
diff -uNr gcc-3.2.2.orig/gcc/configure gcc-3.2.2/gcc/configure
--- gcc-3.2.2.orig/gcc/configure	2003-02-04 11:17:46.000000000 +1100
+++ gcc-3.2.2/gcc/configure	2003-03-16 20:10:03.000000000 +1100
@@ -4206,6 +4206,7 @@
 test_3 ()
 {
   char *x, *y, *z;
+  int i;
 
   x = anonmap (pg);
   if (x == (char *)MAP_FAILED)
@@ -4214,6 +4215,23 @@
   if (y == (char *)MAP_FAILED)
     perror_exit ("test 3 mmap 2", 15);
 
+/* A subtle race condition occurs when the ld.so.cache file is less than one
+   memory page in size. This causes the check to fail when normally it wouldn't.
+   Be sure to actually get the two adjacent 1-page regions.  */
+
+  for (i = 0; i < 8; i++) /* limit to 8 tries */
+    {
+      if (y != x + pg)
+	{
+	  x = y;
+	  y = anonmap(pg);
+	  if (y == (char *)MAP_FAILED)
+	    perror_exit ("test 3 mmap 3", 15);
+	}
+      else
+	  break; /* got one */
+    }
+
   if (y != x + pg)
     {
       if (y == x - pg)
-------------- next part --------------
diff -Naur gcc-3.3-20030506.orig/gcc/Makefile.in gcc-3.3-20030506/gcc/Makefile.in
--- gcc-3.3-20030506.orig/gcc/Makefile.in	2003-04-22 11:50:48.000000000 -0400
+++ gcc-3.3-20030506/gcc/Makefile.in	2003-05-06 17:13:50.471558024 -0400
@@ -384,7 +384,7 @@
 
 # Options to use when compiling libgcc2.a.
 #
-LIBGCC2_DEBUG_CFLAGS = -g
+LIBGCC2_DEBUG_CFLAGS =
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
 
 # Additional options to use when compiling libgcc2.a.
@@ -2332,10 +2332,6 @@
 	rm -f include/limits.h
 	cp xlimits.h include/limits.h
 	chmod a+r include/limits.h
-# Install the README
-	rm -f include/README
-	cp $(srcdir)/README-fixinc include/README
-	chmod a+r include/README
 	$(STAMP) $@
 
 # fixinc.sh depends on this, not on specs directly.
@@ -2366,7 +2362,6 @@
 	(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD}`; \
 	SHELL='$(SHELL)' ;\
 	export TARGET_MACHINE srcdir SHELL ; \
-	$(SHELL) ./fixinc.sh `${PWD}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
 	rm -f include/syslimits.h; \
 	if [ -f include/limits.h ]; then \
 	  mv include/limits.h include/syslimits.h; \
@@ -3026,8 +3021,6 @@
 	done
 	$(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdir)/include/limits.h
 	if [ x$(STMP_FIXINC) != x ] ; then \
-	  $(INSTALL_DATA) $(srcdir)/README-fixinc \
-	    $(DESTDIR)$(itoolsdir)/include/README ; \
 	  $(INSTALL_PROGRAM) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
 	  $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
 	  $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(DESTDIR)$(itoolsdir)/gsyslimits.h ; \
-------------- next part --------------
diff -Naur gcc-3.3.orig/gcc/config/alpha/linux-elf.h gcc-3.3/gcc/config/alpha/linux-elf.h
--- gcc-3.3.orig/gcc/config/alpha/linux-elf.h	2002-12-10 05:55:31.000000000 -0500
+++ gcc-3.3/gcc/config/alpha/linux-elf.h	2003-05-13 17:55:07.265468608 -0400
@@ -28,9 +28,9 @@
 { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
 
 #ifdef USE_GNULIBC_1
-#define ELF_DYNAMIC_LINKER	"/lib/ld.so.1"
+#define ELF_DYNAMIC_LINKER	"/stage1/lib/ld.so.1"
 #else
-#define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+#define ELF_DYNAMIC_LINKER	"/stage1/lib/ld-linux.so.2"
 #endif
 
 #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
diff -Naur gcc-3.3.orig/gcc/config/arm/linux-elf.h gcc-3.3/gcc/config/arm/linux-elf.h
--- gcc-3.3.orig/gcc/config/arm/linux-elf.h	2002-12-10 05:55:31.000000000 -0500
+++ gcc-3.3/gcc/config/arm/linux-elf.h	2003-05-13 17:55:07.322459944 -0400
@@ -84,7 +84,7 @@
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
    %{rdynamic:-export-dynamic} \
-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+   %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2} \
    -X \
    %{mbig-endian:-EB}" \
    SUBTARGET_EXTRA_LINK_SPEC
diff -Naur gcc-3.3.orig/gcc/config/i386/linux.h gcc-3.3/gcc/config/i386/linux.h
--- gcc-3.3.orig/gcc/config/i386/linux.h	2002-11-15 09:57:12.000000000 -0500
+++ gcc-3.3/gcc/config/i386/linux.h	2003-05-13 17:55:07.350455688 -0400
@@ -141,7 +141,7 @@
     %{!ibcs: \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+	%{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2}} \
 	%{static:-static}}}"
 #endif
 
diff -Naur gcc-3.3.orig/gcc/config/i386/linux64.h gcc-3.3/gcc/config/i386/linux64.h
--- gcc-3.3.orig/gcc/config/i386/linux64.h	2003-03-14 01:31:16.000000000 -0500
+++ gcc-3.3/gcc/config/i386/linux64.h	2003-05-13 17:55:07.356454776 -0400
@@ -67,8 +67,8 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+      %{m32:%{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2}} \
+      %{!m32:%{!dynamic-linker:-dynamic-linker /stage1/lib64/ld-linux-x86-64.so.2}}} \
     %{static:-static}}"
 
 #undef  STARTFILE_SPEC
diff -Naur gcc-3.3.orig/gcc/config/ia64/linux.h gcc-3.3/gcc/config/ia64/linux.h
--- gcc-3.3.orig/gcc/config/ia64/linux.h	2002-09-03 17:09:54.000000000 -0400
+++ gcc-3.3/gcc/config/ia64/linux.h	2003-05-13 17:55:07.379451280 -0400
@@ -43,7 +43,7 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+      %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux-ia64.so.2}} \
       %{static:-static}}"
 
 
diff -Naur gcc-3.3.orig/gcc/config/m68k/linux.h gcc-3.3/gcc/config/m68k/linux.h
--- gcc-3.3.orig/gcc/config/m68k/linux.h	2003-01-28 17:18:15.000000000 -0500
+++ gcc-3.3/gcc/config/m68k/linux.h	2003-05-13 17:55:07.386450216 -0400
@@ -164,14 +164,14 @@
   %{!shared:%{!symbolic: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker*:-dynamic-linker /lib/elf/ld-linux.so.1} \
-      %{!rpath*:-rpath /lib/elf/}} %{static}}}"
+      %{!dynamic-linker*:-dynamic-linker /stage1/lib/elf/ld-linux.so.1} \
+      %{!rpath*:-rpath /stage1/lib/elf/}} %{static}}}"
 #else
 #define LINK_SPEC "-m m68kelf %{shared} %{symbolic:-shared -Bsymbolic} \
   %{!shared:%{!symbolic: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker*:-dynamic-linker /lib/ld-linux.so.1}} \
+      %{!dynamic-linker*:-dynamic-linker /stage1/lib/ld-linux.so.1}} \
     %{static}}}"
 #endif
 #else
@@ -179,7 +179,7 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+      %{!dynamic-linker*:-dynamic-linker /stage1/lib/ld.so.1}} \
     %{static}}"
 #endif
 
diff -Naur gcc-3.3.orig/gcc/config/mips/linux.h gcc-3.3/gcc/config/mips/linux.h
--- gcc-3.3.orig/gcc/config/mips/linux.h	2003-05-08 13:31:34.000000000 -0400
+++ gcc-3.3/gcc/config/mips/linux.h	2003-05-13 17:55:07.416445656 -0400
@@ -182,7 +182,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}} \
         %{static:-static}}}"
 
 #undef SUBTARGET_ASM_SPEC
diff -Naur gcc-3.3.orig/gcc/config/pa/pa-linux.h gcc-3.3/gcc/config/pa/pa-linux.h
--- gcc-3.3.orig/gcc/config/pa/pa-linux.h	2002-12-10 05:55:31.000000000 -0500
+++ gcc-3.3/gcc/config/pa/pa-linux.h	2003-05-13 17:55:07.449440640 -0400
@@ -88,7 +88,7 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+      %{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}} \
       %{static:-static}}"
 
 /* glibc's profiling functions don't need gcc to allocate counters.  */
diff -Naur gcc-3.3.orig/gcc/config/rs6000/sysv4.h gcc-3.3/gcc/config/rs6000/sysv4.h
--- gcc-3.3.orig/gcc/config/rs6000/sysv4.h	2003-05-05 12:49:17.000000000 -0400
+++ gcc-3.3/gcc/config/rs6000/sysv4.h	2003-05-13 17:55:07.491434256 -0400
@@ -1145,7 +1145,7 @@
 
 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+  %{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}}}"
 
 #if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
@@ -1185,7 +1185,7 @@
 
 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+  %{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}}}"
 
 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
 %{!undef:					                \
diff -Naur gcc-3.3.orig/gcc/config/s390/linux.h gcc-3.3/gcc/config/s390/linux.h
--- gcc-3.3.orig/gcc/config/s390/linux.h	2002-11-21 07:03:49.000000000 -0500
+++ gcc-3.3/gcc/config/s390/linux.h	2003-05-13 17:55:07.507431824 -0400
@@ -94,7 +94,7 @@
       %{static:-static} \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+	%{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}}}"
 
 #define LINK_ARCH64_SPEC \
   "-m elf64_s390 \
@@ -103,7 +103,7 @@
       %{static:-static} \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}}}"
+	%{!dynamic-linker:-dynamic-linker /stage1/lib/ld64.so.1}}}"
 
 #ifdef DEFAULT_TARGET_64BIT
 #undef  LINK_SPEC
diff -Naur gcc-3.3.orig/gcc/config/sh/linux.h gcc-3.3/gcc/config/sh/linux.h
--- gcc-3.3.orig/gcc/config/sh/linux.h	2002-06-13 15:23:27.000000000 -0400
+++ gcc-3.3/gcc/config/sh/linux.h	2003-05-13 17:55:07.520429848 -0400
@@ -48,7 +48,7 @@
   "%{shared:-shared} \
    %{!static: \
      %{rdynamic:-export-dynamic} \
-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+     %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2} \
      %{!rpath:-rpath /lib}} \
    %{static:-static}"
 
diff -Naur gcc-3.3.orig/gcc/config/sparc/linux.h gcc-3.3/gcc/config/sparc/linux.h
--- gcc-3.3.orig/gcc/config/sparc/linux.h	2002-12-10 05:55:32.000000000 -0500
+++ gcc-3.3/gcc/config/sparc/linux.h	2003-05-13 17:55:07.535427568 -0400
@@ -158,7 +158,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/elf/ld-linux.so.1} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/elf/ld-linux.so.1} \
         %{!rpath:-rpath /lib/elf/}} %{static:-static}}}"
 #else
 #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
@@ -166,7 +166,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.1}} \
         %{static:-static}}}"
 #endif
 #else
@@ -176,7 +176,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2}} \
         %{static:-static}}}"
 #endif
 
diff -Naur gcc-3.3.orig/gcc/config/sparc/linux64.h gcc-3.3/gcc/config/sparc/linux64.h
--- gcc-3.3.orig/gcc/config/sparc/linux64.h	2002-12-10 05:55:32.000000000 -0500
+++ gcc-3.3/gcc/config/sparc/linux64.h	2003-05-13 17:55:07.565423008 -0400
@@ -158,7 +158,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/ld-linux.so.2}} \
         %{static:-static}}} \
 "
 
@@ -167,7 +167,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib64/ld-linux.so.2}} \
         %{static:-static}}} \
 "
 
@@ -227,7 +227,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib64/ld-linux.so.2}} \
         %{static:-static}}} \
 %{mlittle-endian:-EL} \
 %{!mno-relax:%{!r:-relax}} \
diff -Naur gcc-3.3.orig/gcc/config/xtensa/linux.h gcc-3.3/gcc/config/xtensa/linux.h
--- gcc-3.3.orig/gcc/config/xtensa/linux.h	2003-04-25 20:43:44.000000000 -0400
+++ gcc-3.3/gcc/config/xtensa/linux.h	2003-05-13 17:55:07.583420272 -0400
@@ -52,7 +52,7 @@
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+        %{!dynamic-linker:-dynamic-linker /stage1/lib/ld.so.1}} \
       %{static:-static}}}"
 
 #undef LOCAL_LABEL_PREFIX
-------------- next part --------------
This patch prevents Glibc from failing to compile with an error about
sscanf conflicting with a builtin type. It's taken directly from Glibc
CVS without any changes whatsoever.

--- glibc-2.3.2/stdio-common/sscanf.c	2002-08-10 14:09:08.000000000 -0400
+++ glibc-2.3-20030513/stdio-common/sscanf.c	2003-03-05 14:58:03.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1998,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,9 +27,7 @@
 /* Read formatted input from S, according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-sscanf (s, format)
-     const char *s;
-     const char *format;
+sscanf (const char *s, const char *format, ...)
 {
   va_list arg;
   int done;
-------------- next part --------------
--- psmisc-21.2.orig/src/killall.c	2003-05-14 17:29:46.916800248 -0400
+++ psmisc-21.2/src/killall.c	2003-05-14 17:29:59.806840664 -0400
@@ -395,8 +395,7 @@
 #ifdef FLASK_LINUX
   fprintf (stderr, "  -S,--Sid            kill only process(es) having sid\n");
   fprintf (stderr, "  -c,--context        kill only process(es) having scontext\n");
-  fprintf(stderr, "   (-s, -c are mutually exclusive and must precede other
-arguments)\n\n");
+  fprintf(stderr, "   (-s, -c are mutually exclusive and must precede other arguments)\n\n");
 #endif /*FLASK_LINUX*/
 }
 


More information about the lfs-book mailing list