From owner-freebsd-ports@FreeBSD.ORG Mon Jan 3 13:42:31 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2E7016A4CE for ; Mon, 3 Jan 2005 13:42:31 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 951B843D1F for ; Mon, 3 Jan 2005 13:42:30 +0000 (GMT) (envelope-from barner@gmx.de) Received: (qmail invoked by alias); 03 Jan 2005 13:42:28 -0000 Received: from unknown (EHLO zi025.glhnet.mhn.de) (129.187.19.157) by mail.gmx.net (mp003) with SMTP; 03 Jan 2005 14:42:28 +0100 X-Authenticated: #147403 Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id 68EABC110; Mon, 3 Jan 2005 14:42:27 +0100 (CET) Date: Mon, 3 Jan 2005 14:42:27 +0100 From: Simon Barner To: ports@freebsd.org Message-ID: <20050103134227.GA16228@zi025.glhnet.mhn.de> References: <20050103114221.GA897@galgenberg.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: <20050103114221.GA897@galgenberg.net> User-Agent: Mutt/1.5.6i X-Y-GMX-Trusted: 0 Subject: Re: PThread Issue: -pthread vs. -lpthread for a new port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 13:42:32 -0000 --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--