Date: Mon, 3 Jan 2005 14:42:27 +0100 From: Simon Barner <barner@gmx.de> To: ports@freebsd.org Subject: Re: PThread Issue: -pthread vs. -lpthread for a new port Message-ID: <20050103134227.GA16228@zi025.glhnet.mhn.de> In-Reply-To: <20050103114221.GA897@galgenberg.net> References: <20050103114221.GA897@galgenberg.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, the ports framework has the variables ${PTHREAD_CFLAGS} and ${PTHREAD_LIBS} that take care of the right usage of -D_THREAD_SAFE and -pthread, -lpthread, -lc_r respectively. Depending on your FreeBSD version, different combinations are necessary to link in thread support (for details see ports/Mk/bsd.port.mk, ll. 1787). To sum this up: You must not hard-code any of these thread things, but use the PTHREAD_* variables. Simon --AqsLC8rIMeq19msA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFB2UvCCkn+/eutqCoRAjZSAJ9zrxoLFXhEMkq3LV3yOyXljBXVYQCgiPaq ykgFODqLQSDcHiJdCQhtt+Q= =hOBw -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050103134227.GA16228>