+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-06-30 Alexandre Oliva <aoliva@redhat.com>
* dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
/* 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.
#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"
}
int
-pthread_cancel(pthread_t thread ATTRIBUTE_UNUSED)
+pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED)
{
return 0;
}
/* 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.
#endif
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
# define __gthrw2(name,name2,type) \
- extern __typeof(type) name __attribute__ ((__weakref__(#name2)));
+ extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
# define __gthrw_(name) __gthrw_ ## name
#else
# define __gthrw2(name,name2,type)