This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -D_REENTRANT on Solaris
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: -D_REENTRANT on Solaris
- From: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Date: Fri, 23 Oct 1998 09:37:58 -0700
- Cc: ovidiu at slip dot net (Ovidiu Predescu), egcs at cygnus dot com
On Thu, 22 Oct 1998 09:33:35 -0700 (PDT), hjl@lucon.org (H.J. Lu) wrote:
> >
> >
> > Hi,
> >
> > When compiling code for Solaris that uses threads we have to define the
> > _REENTRANT macro so that the thread-safe system functions are used instead. We
> > have to do this at least for the Objective-C runtime library, but this may also
> > be the case for libgcc2.
> >
>
> The Objective-C runtime library is broken because of this. It should
> be fixed similar to the thread-safe exception support in libgcc.a.
I see, thanks for the pointer. Each platform uses a specific flag for enabling
the thread-safe capabilities, -pthread on Linux, -pthreads on Solaris,
-mthreads on AIX and -threads on HPUX.
Now, if egcs was configured with --enable-threads shouldn't we automatically
pass the correct thread flag when we're building runtime libraries? It seems
support for this is not yet in configure. Am I missing something?
Ovidiu