This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: GCC-3.0.4 (pre) on AIX requires pthreads
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Michael Matz <matzmich at cs dot tu-berlin dot de>
- Cc: Phil Edwards <phil at jaj dot com>, Michael Veksler <VEKSLER at il dot ibm dot com>, gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 20 Feb 2002 17:19:32 -0500
- Subject: Re: GCC-3.0.4 (pre) on AIX requires pthreads
>>>>> Michael Matz writes:
Michael> And you really _do_ have configured gcc with --enable-threads=aix _and_
Michael> recompiled gcc? I ask because looking at configure it indeed works as
Michael> Phil said. It basically should have created a new gthr-default.h
Michael> including gthr-aix.h, and gcc -v should mention "Thread model: aix". I'm
Michael> talking about 3_0_branch.
gcc.c emits the thread model using:
#ifdef THREAD_MODEL_SPEC
/* We could have defined THREAD_MODEL_SPEC to "%*" by default,
but there's no point in doing all this processing just to get
thread_model back. */
obstack_init (&obstack);
do_spec_1 (THREAD_MODEL_SPEC, 0, thread_model);
obstack_1grow (&obstack, '\0');
thrmod = obstack_finish (&obstack);
#else
thrmod = thread_model;
#endif
AIX specifically defines THREAD_MODEL_SPEC to satisfy libstdc++, so the
thread model specified to configure is overridden in the gcc -v output.
This is why I initially raised a concern about going down this
path: libstdc++ is trying to use multilibs for something which is not
orthogonal at the installed header file level.
Michael> AIX shouldn't define THREAD_MODEL_SPEC to
Michael> print "posix" if it doen't want posix, because if it's defined at all,
Michael> it's used for forming the "Thread model: xxx" message (and only for this
Micahel> AFAIC see).
AIX does want POSIX, but only when the -pthread option is present
on the commandline. G+ can handle this, but libstdc++ and gthr.h cannot.
Thanks, David