From owner-freebsd-current@FreeBSD.ORG Wed Sep 24 15:29:37 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 0C2CA16A4B3; Wed, 24 Sep 2003 15:29:37 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 834F844003; Wed, 24 Sep 2003 15:29:34 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 6C9362A7EA; Wed, 24 Sep 2003 15:29:34 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Robert Watson In-Reply-To: Date: Wed, 24 Sep 2003 15:29:34 -0700 From: Peter Wemm Message-Id: <20030924222934.6C9362A7EA@canning.wemm.org> cc: deischen@freebsd.org cc: Doug Barton cc: Freebsd Current 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 22:29:37 -0000 Robert Watson wrote: > Based on the results seen thus far, my preference would really be for: > > (1) Keep -pthread, make it imply -lpthread, saving a lot of hassle. Regarding the switch, the gcc folks have been adding -pthread as the 'standard' way to enable pthreads across the board for all platforms. On some systems it also implies -D_REENTRANT and other flags as well. -pthread cannot go away. We'd just be hurting ourselves for no good reason, especially when the rest of the world is syncing up with us. Samples from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog: .... * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if -shared. * config/alpha/linux-elf.h (LIB_SPEC): Likewise. .... * config/ia64/hpux.h: Define CPP_SPEC to set appropriate #defines for -pthread. Add -lpthread to LIB_SPEC when -pthread. In both cases take -mt as a synonym for -pthread for acc compatibility. ... * config/netbsd.h: Update copyright years. (NETBSD_CPP_SPEC): Define _REENTRANT and _PTHREADS if -pthread is specified on the command line. ... Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5