Blame SOURCES/gcc34-pr23591.patch

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