Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/gcc4/gcc make the stdc++ headers usable for clang++...
details: https://anonhg.NetBSD.org/src/rev/dd7ac8b352d5
branches: trunk
changeset: 754619:dd7ac8b352d5
user: drochner <drochner%NetBSD.org@localhost>
date: Thu May 06 10:01:20 2010 +0000
description:
make the stdc++ headers usable for clang++. clang wants that __weakref__
declarations are "static", gcc-4.1 uses "extern" here.
(gcc-4.2 uses "static" as well, so this looks like a bug in gcc.)
approved by mrg
diffstat:
gnu/dist/gcc4/gcc/gthr-posix.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r f52a73f8af95 -r dd7ac8b352d5 gnu/dist/gcc4/gcc/gthr-posix.h
--- a/gnu/dist/gcc4/gcc/gthr-posix.h Thu May 06 09:46:49 2010 +0000
+++ b/gnu/dist/gcc4/gcc/gthr-posix.h Thu May 06 10:01:20 2010 +0000
@@ -62,9 +62,15 @@
# ifndef __gthrw_pragma
# define __gthrw_pragma(pragma)
# endif
+# ifdef __clang__
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# else
# define __gthrw2(name,name2,type) \
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
__gthrw_pragma(weak type)
+# endif
# define __gthrw_(name) __gthrw_ ## name
#else
# define __gthrw2(name,name2,type)
Home |
Main Index |
Thread Index |
Old Index