HP-UX 10.20 & g++ 2.95.2: Have to use -threads

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Jan 7 00:36:00 GMT 2000

> It seems that libgcc.a as well as threads/libgcc.a contain references
> to libcma.1, even when I configured gcc with --disable-threads.
> If I can help you in any way to figure this out (or if this is
> already known and I was too blind to find the workaround), then
> please send me a note.

Thanks for your bug report. This is a FAQ, but I think there is no
universally-accepted answer to the question, yet. So you can
definitely help to figure it out.

Here is how it *should* work: If you configure gcc with
--disable-threads, no reference to thread libraries should be made in

If you configure gcc with --enable-threads, two different copies of
libgcc.a should be created (via the multilib mechanism), and depending
on whether -threads is given, the right copy of libgcc.a is selected.

Usage of threads is controlled in gthr.h. If _PTHREADS, _DCE_THREADS,
or _SOLARIS_THREADS is defined, it uses the appropriate thread
lib. Otherwise, if a gthr-default.h is generated by configure, it uses
that one. Otherwise, it uses gthr-single.h.

I believe the last change to this aspect of hpux configuration was

Thu Mar 19 23:51:01 1998  Jeffrey A Law  (law@cygnus.com)

	* configure.in (hppa1.0-hp-hpux10): Handle threads for this
	config too.

If you come up with a patch that fixes it for all the different cases,
please sent this to gcc-patches@gcc.gnu.org.

If you have further questions, just let us know. Please understand
that I personally have no access to hpux hardware, so I can help only
on the "theoretical" level :-)


More information about the Gcc-bugs mailing list