* What does the -pthread do?
@ 2002-03-29 3:55 Claudius Link
2002-03-31 22:03 ` David Edelsohn
0 siblings, 1 reply; 2+ messages in thread
From: Claudius Link @ 2002-03-29 3:55 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What does the -pthread do?
2002-03-29 3:55 What does the -pthread do? Claudius Link
@ 2002-03-31 22:03 ` David Edelsohn
0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2002-03-31 22:03 UTC (permalink / raw)
To: Claudius Link; +Cc: help-gcc
-pthread compiles and links a program using Posix threads.
GNU/Linux uses the -pthread option. Solaris' native compiler uses the
-pthreads option, so GCC uses that option as well.
-mthreads for AIX was inherited from Lynx OS. Because most GCC
configurations use -pthread, GNU/Linux uses -pthread and -pthread makes
the type of thread library more obvious, with GCC 3.0 AIX changed to use
-pthread.
The -pthread commandline option changes the behavior of system
header files, links the application with GCC libraries builts for Posix
threads, and links with Posix thread support in system libraries.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-01 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-29 3:55 What does the -pthread do? Claudius Link
2002-03-31 22:03 ` David Edelsohn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).