From owner-freebsd-current@FreeBSD.ORG Wed Sep 24 03:25:12 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3420C16A4B3 for ; Wed, 24 Sep 2003 03:25:12 -0700 (PDT) Received: from web20705.mail.yahoo.com (web20705.mail.yahoo.com [216.136.226.178]) by mx1.FreeBSD.org (Postfix) with SMTP id AD84544014 for ; Wed, 24 Sep 2003 03:25:11 -0700 (PDT) (envelope-from agkeahan@yahoo.co.uk) Message-ID: <20030924102511.48634.qmail@web20705.mail.yahoo.com> Received: from [62.90.149.2] by web20705.mail.yahoo.com via HTTP; Wed, 24 Sep 2003 11:25:11 BST Date: Wed, 24 Sep 2003 11:25:11 +0100 (BST) From: =?iso-8859-1?q?Alex=20Keahan?= To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: Fixing -pthreads (Re: ports and -current) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 24 Sep 2003 10:25:12 -0000 Why don't we make -pthread link to the *default* thread library (kse)? Solaris has a similar -mt option: -mt Passes D_REENTRANT to preprocessor. Appends -lthread after all other user-specified libraries on the command line. If you are doing your own multithread coding, you must use this option in the compile and link steps. To obtain faster execution, this option requires a multiprocessor system. On a single-processor system, the resulting executable usually runs more slowly with this option. Solaris 8 also has two pthread libraries, M:N and 1:1, located in /usr/lib and /usr/lib/lwp, respectively. It defaults to M:N, but the alternate libpthread can be selected at runtime by setting the dynamic linker search path as follows: LD_LIBRARY_PATH=/usr/lib/lwp (32-bit) LD_LIBRARY_PATH_64=/usr/lib/lwp/sparcv9 (64-bit) Alternatively, the runpath can be specified at link time: cc -mt ... -R /usr/lib/lwp (32-bit) cc -mt ... -R /usr/lib/lwp/sparcv9 (64-bit) Alex Keahan ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk