Blame SOURCES/gcc34-pr23591.patch

4e62ec
2006-01-10  Benjamin Kosnik  <bkoz@redhat.com>
4e62ec
	    Ulrich Drepper  <drepper@redhat.com>
4e62ec
4e62ec
	PR libstdc++/23591
4e62ec
	* libsupc++/eh_globals.cc: Make global thread local.
4e62ec
4e62ec
--- libstdc++-v3/libsupc++/eh_globals.cc.jj	2005-11-21 14:43:32.000000000 +0100
4e62ec
+++ libstdc++-v3/libsupc++/eh_globals.cc	2006-04-21 15:38:55.000000000 +0200
4e62ec
@@ -36,6 +36,26 @@
4e62ec
 
4e62ec
 using namespace __cxxabiv1;
4e62ec
 
4e62ec
+#if 1
4e62ec
+namespace __gnu_internal
4e62ec
+{
4e62ec
+  __cxxabiv1::__cxa_eh_globals*
4e62ec
+  get_global() throw()
4e62ec
+  {
4e62ec
+    static __thread __cxxabiv1::__cxa_eh_globals global __attribute__((tls_model ("initial-exec")));
4e62ec
+    return &global;
4e62ec
+  }
4e62ec
+}
4e62ec
+
4e62ec
+extern "C" __cxa_eh_globals*
4e62ec
+__cxxabiv1::__cxa_get_globals_fast() throw()
4e62ec
+{ return __gnu_internal::get_global(); }
4e62ec
+
4e62ec
+extern "C" __cxa_eh_globals*
4e62ec
+__cxxabiv1::__cxa_get_globals() throw()
4e62ec
+{ return __gnu_internal::get_global(); }
4e62ec
+
4e62ec
+#else
4e62ec
 
4e62ec
 // Single-threaded fallback buffer.
4e62ec
 static __cxa_eh_globals globals_static;
4e62ec
@@ -125,3 +145,4 @@ __cxa_get_globals () throw()
4e62ec
   return &globals_static;
4e62ec
 #endif
4e62ec
 }
4e62ec
+#endif