This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -D_REENTRANT on Solaris
- To: ovidiu at cup dot hp dot com (Ovidiu Predescu)
- Subject: Re: -D_REENTRANT on Solaris
- From: hjl at lucon dot org (H.J. Lu)
- Date: Fri, 23 Oct 1998 09:45:45 -0700 (PDT)
- Cc: egcs at cygnus dot com
> >
> > 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?
>
No. The Objective-C runtime library should be compiled in such a way
that
# gcc foo.m
will make it single-threaded and
# gcc foo.m -lthread_lib
will make it multi-threaded. That is what the thread-safe exception
does. On ELF, it uses the weak symbols.
--
H.J. Lu (hjl@gnu.org)