summaryrefslogtreecommitdiff
path: root/patches/gcc/4.0.0
diff options
context:
space:
mode:
Diffstat (limited to 'patches/gcc/4.0.0')
-rw-r--r--patches/gcc/4.0.0/fix-fixincl.patch72
-rw-r--r--patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch79
-rw-r--r--patches/gcc/4.0.0/pr20815-fix.patch121
-rw-r--r--patches/gcc/4.0.0/pr20973-fix.patch80
-rw-r--r--patches/gcc/4.0.0/pr21173-fix.patch66
-rw-r--r--patches/gcc/4.0.0/pr21951.patch153
6 files changed, 571 insertions, 0 deletions
diff --git a/patches/gcc/4.0.0/fix-fixincl.patch b/patches/gcc/4.0.0/fix-fixincl.patch
new file mode 100644
index 0000000..8051f31
--- /dev/null
+++ b/patches/gcc/4.0.0/fix-fixincl.patch
@@ -0,0 +1,72 @@
+See http://gcc.gnu.org/PR22541
+
+From: Dan Kegel
+
+When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
+the configure script happily copies the glibc include files from include to sys-include;
+here's the line from the log file (with $PREFIX instead of the real prefix):
+
+Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
+
+But later, when running fixincludes, it gives the error message
+ The directory that should contain system headers does not exist:
+ $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
+
+Nevertheless, it continues building; the header files it installs in
+ $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
+do not include the boilerplate that would cause it to #include_next the
+glibc headers in the system header directory.
+Thus the resulting toolchain can't compile the following program:
+#include <limits.h>
+int x = PATH_MAX;
+because its limits.h doesn't include the glibc header.
+
+That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
+it can refer to $PREFIX/i686-unknown-linux-gnu with the path
+ $PREFIX/lib/../i686-unknown-linux-gnu, but
+that fails because the directory $PREFIX/lib doesn't exist during 'make all';
+it is only created later, during 'make install'. (Which makes this problem
+confusing, since one only notices the breakage well after 'make install',
+at which point the path configure complained about does exist, and has the
+right stuff in it.)
+
+A possible fix is to replace the line in gcc/Makefile.in that says
+ SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+with a version that gets rid of extra ..'s, e.g.
+ SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
+(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
+for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
+
+[rediffed against gcc-4.0.0]
+
+--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
++++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
+@@ -378,7 +378,10 @@
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
++# Purge it of unneccessary internal relative paths
++# to directories that might not exist yet.
++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
+
+ # Control whether to run fixproto and fixincludes.
+ STMP_FIXPROTO = @STMP_FIXPROTO@
+@@ -2838,13 +2841,15 @@
+ ../$(build_subdir)/fixincludes/fixincl: ; @ :
+
+ # Build fixed copies of system files.
++# Abort if no system headers available, unless building a crosscompiler.
++# FIXME: abort unless building --without-headers would be more accurate and less ugly
+ stmp-fixinc: gsyslimits.h macro_list \
+ ../$(build_subdir)/fixincludes/fixincl \
+ ../$(build_subdir)/fixincludes/fixinc.sh
+ @if test ! -d ${SYSTEM_HEADER_DIR}; then \
+ echo The directory that should contain system headers does not exist: >&2 ; \
+ echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
+- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
+ then sleep 1; else exit 1; fi; \
+ fi
+ rm -rf include; mkdir include
diff --git a/patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch b/patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch
new file mode 100644
index 0000000..d9bcffe
--- /dev/null
+++ b/patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch
@@ -0,0 +1,79 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+Fixes following build error for big-endian ARM targets:
+
+armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/bin/../lib/gcc/armeb-unknown-linux-gnu/4.0.0/../../../../armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
+Supported emulations: armelfb_linux armelfb
+collect2: ld returned 1 exit status
+make[2]: *** [crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/csu/crt1.o] Error 1
+make[2]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/csu'
+make[1]: *** [csu/subdir_lib] Error 2
+make[1]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4'
+make: *** [lib] Error 2
+
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
++++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
++ * arm*b-*-linux* (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
++++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
+@@ -650,6 +650,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*-linux*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/patches/gcc/4.0.0/pr20815-fix.patch b/patches/gcc/4.0.0/pr20815-fix.patch
new file mode 100644
index 0000000..7ac8ab5
--- /dev/null
+++ b/patches/gcc/4.0.0/pr20815-fix.patch
@@ -0,0 +1,121 @@
+Date: 18 May 2005 22:47:59 -0000
+Message-ID: <20050518224759.7352.qmail@sourceware.org>
+From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
+To: dank@kegel.com
+References: <20050407215701.20815.dank@kegel.com>
+Reply-To: gcc-bugzilla@gcc.gnu.org
+Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+
+
+------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
+Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+
+>
+> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
+> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
+>
+> coverage_checksum_string already knows a bit about ignoring random seed
+> produced mess. It looks like this needs to be extended somehow to
+> handle namespaces too...
+
+This seems to solve the missmatch. Would it be possible to test it on
+bigger testcase and if it works distile a testcase that don't use
+file IO so it is more suitable for gcc regtesting?
+
+Index: coverage.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
+retrieving revision 1.6.2.12.2.12
+diff -c -3 -p -r1.6.2.12.2.12 coverage.c
+*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
+--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
+*************** coverage_checksum_string (unsigned chksu
+*** 471,505 ****
+ as the checksums are used only for sanity checking. */
+ for (i = 0; string[i]; i++)
+ {
+ if (!strncmp (string + i, "_GLOBAL__", 9))
+! for (i = i + 9; string[i]; i++)
+! if (string[i]=='_')
+! {
+! int y;
+! unsigned seed;
+! int scan;
+!
+! for (y = 1; y < 9; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 9 || string[i + 9] != '_')
+! continue;
+! for (y = 10; y < 18; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 18)
+! continue;
+! scan = sscanf (string + i + 10, "%X", &seed);
+! gcc_assert (scan);
+! if (seed != crc32_string (0, flag_random_seed))
+! continue;
+! string = dup = xstrdup (string);
+! for (y = 10; y < 18; y++)
+! dup[i + y] = '0';
+! break;
+! }
+ break;
+ }
+
+--- 471,511 ----
+ as the checksums are used only for sanity checking. */
+ for (i = 0; string[i]; i++)
+ {
++ int offset = 0;
++ if (!strncmp (string + i, "_GLOBAL__N_", 11))
++ offset = 11;
+ if (!strncmp (string + i, "_GLOBAL__", 9))
+! offset = 9;
+!
+! /* C++ namespaces do have scheme:
+! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
+! since filename might contain extra underscores there seems
+! to be no better chance then walk all possible offsets looking
+! for magicnuber. */
+! if (offset)
+! for (;string[offset]; offset++)
+! for (i = i + offset; string[i]; i++)
+! if (string[i]=='_')
+! {
+! int y;
+!
+! for (y = 1; y < 9; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 9 || string[i + 9] != '_')
+! continue;
+! for (y = 10; y < 18; y++)
+! if (!(string[i + y] >= '0' && string[i + y] <= '9')
+! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
+! break;
+! if (y != 18)
+! continue;
+! if (!dup)
+! string = dup = xstrdup (string);
+! for (y = 10; y < 18; y++)
+! dup[i + y] = '0';
+! }
+ break;
+ }
+
+
+
+--
+
+
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
+
+------- You are receiving this mail because: -------
+You reported the bug, or are watching the reporter.
+
+
diff --git a/patches/gcc/4.0.0/pr20973-fix.patch b/patches/gcc/4.0.0/pr20973-fix.patch
new file mode 100644
index 0000000..7451219
--- /dev/null
+++ b/patches/gcc/4.0.0/pr20973-fix.patch
@@ -0,0 +1,80 @@
+http://gcc.gnu.org/PR20973
+
+"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically
+leads to all websites being misrendered. I can't easily reduce the testcase,
+but have applied the whole preprocessed source of css/cssstyleselector.ii.
+
+It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686
+-fno-exceptions. A more detailed analysis will follow, as we've found out
+some things already."
+
+---
+
+Subject: Bug 20973
+
+CVSROOT: /cvs/gcc
+Module name: gcc
+Branch: gcc-4_0-branch
+Changes by: matz@gcc.gnu.org 2005-04-22 17:30:21
+
+Modified files:
+ gcc : ChangeLog reload.c
+
+Log message:
+ PR middle-end/20973
+ * reload.c (push_reload, find_dummy_reload): Check for uninitialized
+ pseudos.
+
+Patches:
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.177&r2=2.7592.2.178
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.268&r2=1.268.2.1
+
+---
+
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/reload.c,v
+retrieving revision 1.268
+retrieving revision 1.268.2.1
+diff -u -r1.268 -r1.268.2.1
+--- gcc/gcc/reload.c 2005/02/24 22:06:06 1.268
++++ gcc/gcc/reload.c 2005/04/22 17:30:15 1.268.2.1
+@@ -1520,7 +1520,7 @@
+ But if there is no spilling in this block, that is OK.
+ An explicitly used hard reg cannot be a spill reg. */
+
+- if (rld[i].reg_rtx == 0 && in != 0)
++ if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
+ {
+ rtx note;
+ int regno;
+@@ -1534,6 +1534,11 @@
+ && REG_P (XEXP (note, 0))
+ && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
+ && reg_mentioned_p (XEXP (note, 0), in)
++ /* Check that we don't use a hardreg for an uninitialized
++ pseudo. See also find_dummy_reload(). */
++ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
++ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
++ ORIGINAL_REGNO (XEXP (note, 0))))
+ && ! refers_to_regno_for_reload_p (regno,
+ (regno
+ + hard_regno_nregs[regno]
+@@ -1997,7 +2002,17 @@
+ is a subreg, and in that case, out
+ has a real mode. */
+ (GET_MODE (out) != VOIDmode
+- ? GET_MODE (out) : outmode)))
++ ? GET_MODE (out) : outmode))
++ /* But only do all this if we can be sure, that this input
++ operand doesn't correspond with an uninitialized pseudoreg.
++ global can assign some hardreg to it, which is the same as
++ a different pseudo also currently live (as it can ignore the
++ conflict). So we never must introduce writes to such hardregs,
++ as they would clobber the other live pseudo using the same.
++ See also PR20973. */
++ && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
++ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
++ ORIGINAL_REGNO (in))))
+ {
+ unsigned int regno = REGNO (in) + in_offset;
+ unsigned int nwords = hard_regno_nregs[regno][inmode];
diff --git a/patches/gcc/4.0.0/pr21173-fix.patch b/patches/gcc/4.0.0/pr21173-fix.patch
new file mode 100644
index 0000000..0582d75
--- /dev/null
+++ b/patches/gcc/4.0.0/pr21173-fix.patch
@@ -0,0 +1,66 @@
+See http://gcc.gnu.org/PR21173
+This is a fix for a last minute brown-bag bug with gcc-4.0.0
+
+ ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] -------
+Subject: Bug 21173
+
+CVSROOT: /cvs/gcc
+Module name: gcc
+Branch: gcc-4_0-branch
+Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38
+
+Modified files:
+ gcc : ChangeLog tree-ssa-pre.c
+
+Log message:
+ 2005-04-25 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/21173
+
+ * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
+ on things we pass to force_gimple_operand. Don't try to special
+ case min_invariants.
+
+Patches:
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.192&r2=2.7592.2.193
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.65.4.2&r2=2.65.4.3
+
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
+retrieving revision 2.65.4.2
+retrieving revision 2.65.4.3
+diff -u -r2.65.4.2 -r2.65.4.3
+--- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
++++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
+@@ -1330,7 +1330,8 @@
+
+ folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1, genop2));
+- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
++ newexpr = force_gimple_operand (unshare_expr (folded),
++ &forced_stmts, false, NULL);
+ if (forced_stmts)
+ {
+ tsi = tsi_start (forced_stmts);
+@@ -1372,14 +1373,8 @@
+ add_referenced_tmp_var (temp);
+ folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1));
+- /* If the generated operand is already GIMPLE min_invariant
+- just use it instead of calling force_gimple_operand on it,
+- since that may make it not invariant by copying it into an
+- assignment. */
+- if (!is_gimple_min_invariant (genop1))
+- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
+- else
+- newexpr = genop1;
++ newexpr = force_gimple_operand (unshare_expr (folded),
++ &forced_stmts, false, NULL);
+ if (forced_stmts)
+ {
+ tsi = tsi_start (forced_stmts);
+
+ 0K . 1.24 MB/s
+
+13:16:54 (1.24 MB/s) - `-' saved [1303]
+
diff --git a/patches/gcc/4.0.0/pr21951.patch b/patches/gcc/4.0.0/pr21951.patch
new file mode 100644
index 0000000..8c5ffb9
--- /dev/null
+++ b/patches/gcc/4.0.0/pr21951.patch
@@ -0,0 +1,153 @@
+Workaround for buglet in std::vector etc. when compiling
+with gcc-4.0.0 -Wall -O -fno-exceptions
+Fixes:
+
+.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
+_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
+.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
+non-void function 'typename _Alloc::pointer std::vector<_Tp,
+_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
+_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
+
+See http://gcc.gnu.org/PR21951
+
+--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old 2005-06-11 03:58:20.000000000 -0700
++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h 2005-06-11 04:01:21.000000000 -0700
+@@ -765,13 +765,13 @@
+ {
+ std::__uninitialized_copy_a(__first, __last, __result,
+ this->get_allocator());
+- return __result;
+ }
+ catch(...)
+ {
+ _M_deallocate(__result, __n);
+ __throw_exception_again;
+ }
++ return __result;
+ }
+
+
+--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old 2005-06-11 03:58:20.000000000 -0700
++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h 2005-06-11 04:05:18.990003248 -0700
+@@ -84,13 +84,13 @@
+ {
+ for (; __first != __last; ++__first, ++__cur)
+ std::_Construct(&*__cur, *__first);
+- return __cur;
+ }
+ catch(...)
+ {
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
+ }
++ return __cur;
+ }
+
+ /**
+@@ -236,13 +236,13 @@
+ {
+ for (; __first != __last; ++__first, ++__cur)
+ __alloc.construct(&*__cur, *__first);
+- return __cur;
+ }
+ catch(...)
+ {
+ std::_Destroy(__result, __cur, __alloc);
+ __throw_exception_again;
+ }
++ return __cur;
+ }
+
+ template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
+@@ -337,11 +337,13 @@
+ {
+ return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
+ }
++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
+ catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
++#endif
+ }
+
+ // __uninitialized_fill_copy
+@@ -360,11 +362,13 @@
+ {
+ return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
+ }
++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
+ catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
++#endif
+ }
+
+ // __uninitialized_copy_fill
+--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old 2005-06-11 03:58:20.000000000 -0700
++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope 2005-06-11 04:13:26.628870872 -0700
+@@ -1645,11 +1645,13 @@
+ _S_cond_store_eos(__buf[__size]);
+ try
+ { return _S_new_RopeLeaf(__buf, __size, __a); }
++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
+ catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
+ __throw_exception_again;
+ }
++#endif
+ }
+
+ // Concatenation of nonempty strings.
+--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old 2005-06-11 03:58:20.000000000 -0700
++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory 2005-06-11 04:13:52.897877376 -0700
+@@ -85,11 +85,13 @@
+ std::_Construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
+ catch(...)
+ {
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
+ }
++#endif
+ }
+
+ template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
+@@ -144,11 +146,13 @@
+ __alloc.construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
+ catch(...)
+ {
+ std::_Destroy(__result, __cur, __alloc);
+ __throw_exception_again;
+ }
++#endif
+ }
+
+ template<typename _InputIter, typename _Size, typename _ForwardIter,
+--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old 2005-06-11 03:58:20.000000000 -0700
++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h 2005-06-11 04:14:28.384482592 -0700
+@@ -607,13 +607,13 @@
+ try
+ {
+ this->get_allocator().construct(&__n->_M_val, __obj);
+- return __n;
+ }
+ catch(...)
+ {
+ _M_put_node(__n);
+ __throw_exception_again;
+ }
++ return __n;
+ }
+
+ void