http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47802

--- Comment #23 from dave at hiauly1 dot hia.nrc.ca 2011-02-24 14:55:52 UTC ---
On Thu, 24 Feb 2011, jb at gcc dot gnu.org wrote:

> > libgfortran.sl is built twice on HP-UX 10, once for the single thread
> > model and once for the dce thread model.  It's the single thread build
> > that's the problem.
> 
> Why is this necessary? Isn't it possible to use the dce thread library from a
> single threaded application? 

I believe that it's primarily a performance issue.  Threaded applications
are linked with -lcma -lc_r.  Non threaded applications are linked with -lc.

If only the dce thread model was used, there probably would be issues with
the GTHREADS interface due to the lack of weak symbols.  libc.sl doesn't
have dce thread stubs.  So, all applications would have to be linked as 
threaded applications.

> I suppose one way to fix this would be to somehow make the autoconf checks for
> the _r functions fail if the prototypes are not found?

I'm wondering if the backend should always define _REENTRANT on HP-UX 10.
I'd have to check that all the *_r functions are in libc.  For libraries
that don't explicitly need thread support, it would be good if they could
be linked into both threaded and non threaded applications.

Dave

Reply via email to