From owner-freebsd-current@FreeBSD.ORG Fri Nov 10 23:56:15 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1798A16A415; Fri, 10 Nov 2006 23:56:15 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-current@freebsd.org Date: Sat, 11 Nov 2006 07:56:11 +0800 User-Agent: KMail/1.8.2 References: <20061110151247.GA64530@zone3000.net> <20061110173526.GA22441@rambler-co.ru> In-Reply-To: <20061110173526.GA22441@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611110756.11517.davidxu@freebsd.org> Cc: current@freebsd.org Subject: Re: libpthread vs libthr. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2006 23:56:15 -0000 On Saturday 11 November 2006 01:35, Ruslan Ermilov wrote: > Hi, > > To make user's life easier, I suggest the following simple patch. > Its effect on platforms where libpthread is available is to (sym)link > libthr to libpthread if WITHOUT_LIBPTHREAD is set in /etc/src.conf. > This would allow more people interested in libthr testing to more > easily do it. (Of course already linked applications wouldn't > magically start using libthr without also patching /etc/libmap.conf.) > > %%% > Index: Makefile > =================================================================== > RCS file: /home/ncvs/src/lib/libthr/Makefile,v > retrieving revision 1.20 > diff -u -p -r1.20 Makefile > --- Makefile 22 Aug 2006 07:51:06 -0000 1.20 > +++ Makefile 10 Nov 2006 17:27:40 -0000 > @@ -42,7 +42,7 @@ PRECIOUSLIB= > .include "${.CURDIR}/sys/Makefile.inc" > .include "${.CURDIR}/thread/Makefile.inc" > > -.if ${MACHINE_ARCH} == "sparc64" > +.if ${MACHINE_ARCH} == "sparc64" || ${MK_LIBPTHREAD} == "no" > SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a > .if !defined(NO_PIC) > SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so > %%% > > > Cheers, Hi, I think this patch is useful. :-) Thanks, David Xu