751a3fc
--- gcc/gthr-default.h.jj	2007-12-14 16:24:42.515800719 +0100
751a3fc
+++ gcc/gthr-default.h	2007-11-24 23:05:01.000000000 +0100
751a3fc
@@ -0,0 +1 @@
751a3fc
+#include "gthr-posix.h"
751a3fc
--- gcc/gthr-posix.h.jj	2007-07-04 20:46:26.000000000 +0200
751a3fc
+++ gcc/gthr-posix.h	2007-12-20 16:04:49.000000000 +0100
751a3fc
@@ -62,9 +62,15 @@ typedef pthread_mutex_t __gthread_recurs
751a3fc
 # ifndef __gthrw_pragma
751a3fc
 #  define __gthrw_pragma(pragma)
751a3fc
 # endif
751a3fc
-# define __gthrw2(name,name2,type) \
751a3fc
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
751a3fc
+#  define __gthrw2(name,name2,type) \
751a3fc
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
751a3fc
+  __gthrw_pragma(weak type)
751a3fc
+# else
751a3fc
+#  define __gthrw2(name,name2,type) \
751a3fc
   extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
751a3fc
   __gthrw_pragma(weak type)
751a3fc
+# endif
751a3fc
 # define __gthrw_(name) __gthrw_ ## name
751a3fc
 #else
751a3fc
 # define __gthrw2(name,name2,type)