This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed Tru64 UNIX patches


Jakub Jelinek <jakub@redhat.com> writes:

> 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).

Makes sense.  Thanks.

> 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.

Why not use __attribute__ ((weak))?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]