From owner-freebsd-threads@FreeBSD.ORG Mon Sep 8 15:39:26 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86D2716A4BF; Mon, 8 Sep 2003 15:39:26 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A305744005; Mon, 8 Sep 2003 15:39:25 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h88MdOtp011732; Mon, 8 Sep 2003 18:39:24 -0400 (EDT) Date: Mon, 8 Sep 2003 18:39:24 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Loren James Rittle In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: jb@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Removing -pthread from gcc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 22:39:26 -0000 On Fri, 5 Sep 2003, Daniel Eischen wrote: > > On Fri, 5 Sep 2003, Loren James Rittle wrote: > > Thank you for considering these words. BTW, wouldn't it be cooler > > if (example only): > > > > -pthread (whatever the system default) > > -pthread=1 (1 process, aka -lc_r) > > -pthread=1:1 (1 process per thread, aka -lthr) > > -pthread=M:N (M threads in N processes, aka -lkse) > > -pthread=late/weak (perhaps not good ELF form, link against a stub to > > which all POSIX thread libraries on FreeBSD must conform, do not > > record the dependency ala FreeBSD4 default for -lc; or that does it in > > a weak manner en mass such that binding is deferred to the final > > selection made at a final link time) > > That's a lot better :-) The only problem is that we have 2 > different libraries that offer 1:1... > > I would not object to this approach, but I would like to > temporarily make -pthread (without args) either a NOOP or > an error in our tree to help correct "shortcoming in ports". So is there a consensus? My take is that we make -pthread a NOOP. I do have some reservations with -pthread= though. With all the applications written primarily for Linux, I am fearful that those applications will use -pthread=1:1 just because that is Linux' threading model. The performance, reliability, etc of threading models will vary from OS to OS, so you'd probably end up basing the selected threading model on the OS. This defeats the point of having a standard compiler option; you might as well make it a link option (which it already is). -- Dan Eischen