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]

Re: What does the -pthread do?


	-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


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