This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ??,?: Yet a question about g++/STL/multithreading
- To: "PeterPan" <peterpan at chinaren-inc dot com>
- Subject: Re: ??,?: Yet a question about g++/STL/multithreading
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 26 Apr 2001 04:29:38 -0300
- Cc: <help-gplusplus at gnu dot org>, <gcc-bugs at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <FKEMIGHMDFGBECEMMEIMAEFKCBAA.peterpan@chinaren-inc.com>
On Apr 26, 2001, "PeterPan" <peterpan@chinaren-inc.com> wrote:
> is there any flags of gcc/g++ to use them directly?(-pthreads not works)
You can edit the *cpp and *lib specs. In GCC 3.0, on Solaris/x86,
they will contain:
%{pthreads:-D_REENTRANT -D_PTHREADS} \
%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
%{!shared:\
%{!symbolic:\
%{pthreads:-lpthread} \
%{!pthreads:%{threads:-lthread}} \
-lc}}
I had failed to note you were using Solaris/x86. -pthreads already
works in GCC 2.95.2 on Solaris/sparc, but these options weren't
introduced on Solaris/x86 too, probably because of an oversight, to be
corrected in 3.0.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me