This is the mail archive of the gcc-help@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]

What does the -pthread do?


Hello,

I am quite confused at the moment. I just found the -pthread option for gcc
mentioned on the blitz++ (a numerical library at
		http://www.oonumerics.org/blitz/manual/blitz08.html#l118)
home page and tried to check what it actually did.

But only very unsuccessful.
For gcc 3.0.3 and 2.95.4 there is only a  -mthreads option for IBM RS/6000 
mentioned in the manual. 
But both gcc versions seem to accepted -pthread.

To get me even more confused everything changes in the current development
version of the gcc manual.
The i386 options list now contains '-mthreads' and RS/6000 get '-pthread'.

The only difference I could notice was that _REENTRANT was defined.

Are there more differences?
An what is the right way to compile and link an threaded program (preferable
now an in future :-) with gcc?

Regards,
Claudius

BTW: I am not on the list so it would be nice to CC replys to me as well. I

-- 
   Institute for Applied Mathematics              Phone: +49-761-203-5633
   Hermann-Herder-Str. 10                         Fax: +49-761-203-5632
   Freiburg University
   79104 Freiburg / Brsg., Germany


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