re PR bootstrap/52569 (bootstrap fails on x86_64-apple-darwin10 at revision 185261)
authorRichard Guenther <rguenther@suse.de>
Tue, 13 Mar 2012 10:00:48 +0000 (10:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 13 Mar 2012 10:00:48 +0000 (10:00 +0000)
2012-03-13  Richard Guenther  <rguenther@suse.de>

PR target/52569
* unwind-dw2-fde.c: Make avoid-include-gthr.h hacks work again.

From-SVN: r185322

libgcc/ChangeLog
libgcc/unwind-dw2-fde.c

index 61b2c6766c28e33b367091291332b5522212fed7..de9eebe9671e0a9d8f0087d04f4a6de5180d519d 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-13  Richard Guenther  <rguenther@suse.de>
+
+       PR target/52569
+       * unwind-dw2-fde.c: Make avoid-include-gthr.h hacks work again.
+
 2012-03-13  Richard Guenther  <rguenther@suse.de>
 
        * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Fix definition.
index 54eaebac27e42c57febc0926c73600cbeed79dda..b99a432edb9788dd5fd95fd84e08896071a5e847 100644 (file)
@@ -49,6 +49,7 @@ static struct object *seen_objects;
 static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT;
 #define init_object_mutex_once()
 #else
+#ifdef __GTHREAD_MUTEX_INIT_FUNCTION
 static __gthread_mutex_t object_mutex;
 
 static void
@@ -63,6 +64,12 @@ init_object_mutex_once (void)
   static __gthread_once_t once = __GTHREAD_ONCE_INIT;
   __gthread_once (&once, init_object_mutex);
 }
+#else
+/* ???  Several targets include this file with stubbing parts of gthr.h
+   and expect no locking to be done.  */
+#define init_object_mutex_once()
+static __gthread_mutex_t object_mutex;
+#endif
 #endif
 
 /* Called from crtbegin.o to register the unwind info for an object.  */