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]
Other format: [Raw text]

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


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