Patch for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50888

--- a/src/libjava/libjava/prims.cc.orig	2012-01-20 11:30:18.586157610 +0100
+++ b/src/libjava/libjava/prims.cc	2012-01-20 11:30:58.192770947 +0100
@@ -38,6 +38,14 @@
 #endif
 
 #ifndef DISABLE_GETENV_PROPERTIES
+#ifdef __GLIBC__
+/* glibc 2.15+ provides even for C++ inline optimized ::isspace etc.
+   Unfortunately those inlines are throw (), and call a function pointer
+   (which is throw () too, but with -fnon-call-exceptions this results
+   in a __cxa_call_unexpected call.  This macro disables the optimized
+   version.  */
+#define __NO_CTYPE 1
+#endif
 #include <ctype.h>
 #include <java-props.h>
 #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
--- a/src/libjava/prims.cc.orig	2012-01-20 11:30:23.042818341 +0100
+++ b/src/libjava/prims.cc	2012-01-20 11:31:01.389433254 +0100
@@ -38,6 +38,14 @@
 #endif
 
 #ifndef DISABLE_GETENV_PROPERTIES
+#ifdef __GLIBC__
+/* glibc 2.15+ provides even for C++ inline optimized ::isspace etc.
+   Unfortunately those inlines are throw (), and call a function pointer
+   (which is throw () too, but with -fnon-call-exceptions this results
+   in a __cxa_call_unexpected call.  This macro disables the optimized
+   version.  */
+#define __NO_CTYPE 1
+#endif
 #include <ctype.h>
 #include <java-props.h>
 #define PROCESS_GCJ_PROPERTIES process_gcj_properties()