diff options
author | 1999-02-28 15:51:14 +0000 | |
---|---|---|
committer | 1999-02-28 15:51:14 +0000 | |
commit | dfbb39184e852d243775ccdfb01f7433499a93b8 (patch) | |
tree | 3f9d5e42d947a020ab84d0fa0efd700416df6094 | |
parent | Formatting changes: conform to the gnu coding standard guidelines. (diff) | |
download | wireguard-openbsd-dfbb39184e852d243775ccdfb01f7433499a93b8.tar.xz wireguard-openbsd-dfbb39184e852d243775ccdfb01f7433499a93b8.zip |
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.
-rw-r--r-- | gnu/usr.bin/gcc/config/openbsd.h | 5 |
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 |