------- Comment #4 from pinskia at gcc dot gnu dot org 2006-04-02 19:16 ------- This is interesting because: static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once")));
That should have made that decl weak which in turn should not needed to have this decl declared in the program. Can you try this simple C program and see if it can link? int f(void); static __typeof(f) __gthrw_f __attribute__ ((__weakref__("f"))); int main(void) { if (__gthrw_f) { __gthrw_f (); abort (0); } exit (0); } ------ If this does not work, then there is something wrong with the static linker on OpenBSD. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26966