This is the mail archive of the gcc@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]

Re: -D_REENTRANT on Solaris


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




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