This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed Tru64 UNIX patches
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Rainer Orth <ro at techfak dot uni-bielefeld dot de>, gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 3 Jul 2007 10:11:26 -0400
- Subject: Re: Unreviewed Tru64 UNIX patches
- References: <18030.54016.600032.108929@manam.TechFak.Uni-Bielefeld.DE> <18039.40283.759396.931810@manam.TechFak.Uni-Bielefeld.DE> <18048.57912.929025.919448@manam.TechFak.Uni-Bielefeld.DE> <18058.13856.219801.745064@manam.TechFak.Uni-Bielefeld.DE> <m3tzslfuy2.fsf@localhost.localdomain>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 03, 2007 at 07:00:53AM -0700, Ian Lance Taylor wrote:
> > > The following patch is still unreviewed:
> > >
> > > > > * 4.1/4.2 PATCH: Restore weak definitions of pthread functions on Tru64 UNIX (PR target/28307)
> > > > > http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00533.html
> > > > >
> > > > > Ok for 4.1, 4.2 and mainline?
> > > >
> > > > And this one needs a libgcc maintainer.
> > > >
> > > > > Since they touch areas outside of the alpha-dec-osf configuration, I'm
> > > > > quite reluctant to install them under the Tru64 UNIX maintainership.
>
> I took a look at this patch. I don't understand why the __weakref__
> attribute doesn't work. What is the difference between _Pragma(weak name)
> and __attribute__(__weakref__(name))? I see that the name argument is
> difference, but I don't understand why. Basically I don't understand
> why we can't do this using __attribute__.
weakref makes only references weak, and only as long as there aren't
any non-weakref references in the same source. Previously (I guess)
all definitions in gthr-posix.c (only used by Tru64) were weak because
of #pragma weak pthread_... in gthr-posix.h, but with weakref attribute
instead they are strong (as they are definitions).
My preference would be not to modify gthr-posix.h, but instead
add #pragma weak pthread_... to gthr-posix.c for all symbols that
file defines.
Jakub