summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-02-28 15:51:15 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-02-28 15:51:15 +0000
commit4809f068e272245764c44c196ca5bffa1516699f (patch)
tree5dade781a715b4dee3f68b371c61ca68c07d561d /gnu
parent1388621152ee76aa635a44682f3165d8febb1602 (diff)
From: Jeffrey A Law <law@hurl.cygnus.com>
Marc Espie writes: > I haven't really been able to follow thru the code (and my current build > is not finished yet, so I can't do the check myself), but your recent patch > > to handle weak correctly does look like __attribute__((weak)) will work > correctly only if HANDLE_PRAGMA_WEAK is asserted. > > This is a problem, as HANDLE_PRAGMA_WEAK is a choice, not a feature (at > least, that's what the gcc.info documentation seems to imply for > HANDLE_SYSV_PRAGMA). When HANDLE_PRAGMA_WEAK is false, the code will continue to fail as it has failed for years. Not perfect by any means. Feel free to fix it. It is still a choice, selecting that choice is the only way to get functional weak support right now. What needs to happen long term is the generic weak/alias code needs to become unconditional and only the pragma parsing of that code be conditional.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gcc/config/openbsd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/config/openbsd.h b/gnu/usr.bin/gcc/config/openbsd.h
index af8358eb153..d865c8c03f1 100644
--- a/gnu/usr.bin/gcc/config/openbsd.h
+++ b/gnu/usr.bin/gcc/config/openbsd.h
@@ -300,3 +300,8 @@ do { \
#pragma weak. */
#define GTHREAD_USE_WEAK 0
+/* bug work around: we don't want to support #pragma weak, but the current
+ code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to
+ work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
+ as this depends on a few other details as well... */
+#define HANDLE_SYSV_PRAGMA