From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:25:52 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3475716A419 for ; Mon, 4 Feb 2008 15:25:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1D00613C4F0 for ; Mon, 4 Feb 2008 15:25:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 169AC1A4D83; Mon, 4 Feb 2008 07:10:39 -0800 (PST) From: John Baldwin To: freebsd-threads@freebsd.org Date: Mon, 4 Feb 2008 09:42:26 -0500 User-Agent: KMail/1.9.7 References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> In-Reply-To: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802040942.26708.jhb@freebsd.org> Cc: "Karl H. Beckers" Subject: Re: threading in FreeBSD (acx_pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 15:25:52 -0000 On Monday 04 February 2008 06:31:23 am Karl H. Beckers wrote: > Hi all, > > could you please include me directly in your replies ... I haven't > subscribed. > > I'm trying to move my configure.in from manual threading libs detection > to acx_pthreads. That, however, prefers -kthread over -pthread where I > previously did this: > > if ( test -x /sbin/sysctl ) ; then > ac_my_freebsd_release=`/sbin/sysctl -n > kern.osreldate` > else > ac_my_freebsd_release=`/usr/sbin/sysctl -n > kern.osreldate` > fi > if ( expr ${ac_my_freebsd_release} \< 500016 ) ; then > LIBS="${LIBS} -pthread" > else > LIBS="${LIBS} -lc_r" > fi > > Could anybody make a recommendation of the propert thing to do on > FreeBSD? Is the acx_pthread assumption OK, or should I patch that? Just always use -pthread. -lc_r is wrong on 6.x+ anyway, but -pthread should always work. -- John Baldwin