Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2006 15:05:12 +1000
From:      Mark Andrews <Mark_Andrews@isc.org>
To:        stable@freebsd.org
Subject:   gcc -pthread
Message-ID:  <200606150505.k5F55CqJ054445@drugs.dv.isc.org>

next in thread | raw e-mail | index | archive | help

	Is there any good reason why "gcc -pthread" links in
	-lpthead except when -shared is specified?

	Also the gcc man page does not match reality.

       -pthread
              Link a user-threaded process against libc_r instead of libc.

	man pthread mentions these libraries but provided no discussion
	on if or when you should include them on the command line.  Nor
	does it mention "-pthread".

LIBRARY
     POSIX Threads Library (libpthread, -lpthread)
     1:1 Threading Library (libthr, -lthr)
     Reentrant C Library (libc_r, -lc_r)

	The hacker handbook seems to indicate that you shouldn't need
	to use -lpthread or -lc_r.

	http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-pthread.html

	Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE:	+61 2 9871 4742		         INTERNET: Mark_Andrews@isc.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606150505.k5F55CqJ054445>