re PR target/28307 (pthread functions in libgcc not weak any more on Tru64 UNIX)
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Tue, 3 Jul 2007 13:41:00 +0000 (13:41 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 3 Jul 2007 13:41:00 +0000 (13:41 +0000)
PR target/28307
* gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK]
(__gthrw_pragma): Provide default definition.
(__gthrw2): Use it.
* gthr-posix.c (__gthrw_pragma): Define.

From-SVN: r126253

gcc/ChangeLog
gcc/gthr-posix.c
gcc/gthr-posix.h

index d8ed672acb40180993dad3986756a0336fa5f8ee..2cbddc7f0393065431d1d7a434548b8bcfcd2aca 100644 (file)
@@ -1,3 +1,11 @@
+2007-07-03  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       PR target/28307
+       * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK]
+       (__gthrw_pragma): Provide default definition.
+       (__gthrw2): Use it.
+       * gthr-posix.c (__gthrw_pragma): Define.
+
 2007-07-03  Daniel Berlin  <dberlin@dberlin.org>
 
        * tree-ssa-sccvn.c (set_ssa_val_to): Check for operand_equal_p
index a8922c0c16bb7ecac6d6596e511077a6e90ad65c..e2d731ae407761d73479452c497489a7d0835452 100644 (file)
@@ -1,6 +1,6 @@
 /* POSIX threads dummy routines for systems without weak definitions.  */
 /* Compile this one with gcc.  */
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 
 #include "tconfig.h"
 #include "tm.h"
+# define __gthrw_pragma(pragma) _Pragma (#pragma)
 /* Define so we provide weak definitions of functions used by libobjc only.  */
 #define _LIBOBJC_WEAK
 #include "gthr.h"
@@ -75,7 +76,7 @@ pthread_create (pthread_t *thread ATTRIBUTE_UNUSED,
 }
 
 int
-pthread_cancel(pthread_t thread ATTRIBUTE_UNUSED)
+pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED)
 {
   return 0;
 }
index 837bc1a9820ea01d6cc505bb432e6f04f6af5c4e..47d38a320bae9a55c6856de9d14d4e7d0d06ccbd 100644 (file)
@@ -1,6 +1,6 @@
 /* Threads compatibility routines for libgcc2 and libobjc.  */
 /* Compile this one with gcc.  */
-/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -59,8 +59,12 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t;
 #endif
 
 #if SUPPORTS_WEAK && GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
 # define __gthrw2(name,name2,type) \
-  static __typeof(type) name __attribute__ ((__weakref__(#name2)));
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak type)
 # define __gthrw_(name) __gthrw_ ## name
 #else
 # define __gthrw2(name,name2,type)