From owner-freebsd-threads@FreeBSD.ORG Mon Sep 8 17:45:19 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 B60E316A4BF; Mon, 8 Sep 2003 17:45:19 -0700 (PDT) Received: from motgate4.mot.com (motgate4.mot.com [144.189.100.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5290F43FB1; Mon, 8 Sep 2003 17:45:18 -0700 (PDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: from az33exr03.mot.com (pobox3.mot.com [10.64.251.242]) by motgate4.mot.com (Motorola/Motgate4) with ESMTP id h890jH0Y011492; Mon, 8 Sep 2003 17:45:17 -0700 (MST) Received: from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116])h890jFZw006043; Mon, 8 Sep 2003 19:45:15 -0500 Received: from latour.rsch.comm.mot.com (localhost.rsch.comm.mot.com [127.0.0.1])h890jD6e041333; Mon, 8 Sep 2003 19:45:13 -0500 (CDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.12.9/8.12.9/Submit) id h890jDHT041330; Mon, 8 Sep 2003 19:45:13 -0500 (CDT) Date: Mon, 8 Sep 2003 19:45:13 -0500 (CDT) From: Loren James Rittle Message-Id: <200309090045.h890jDHT041330@latour.rsch.comm.mot.com> To: freebsd-threads@FreeBSD.org In-reply-to: <20030906000902.GA25237@freebsd1.cimlogic.com.au> (message from John Birrell on Sat, 6 Sep 2003 10:09:02 +1000) References: <200309052235.h85MZoRF015386@latour.rsch.comm.mot.com> <20030906000902.GA25237@freebsd1.cimlogic.com.au> User-Agent: SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharaji?= =?ISO-8859-4?Q?ng=FE-mae?=) LEMI/1.14.1 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII cc: deischen@FreeBSD.org cc: jb@FreeBSD.org Subject: Re: Removing -pthread from gcc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: rittle@labs.mot.com List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 00:45:19 -0000 In article <20030906000902.GA25237@freebsd1.cimlogic.com.au>, John Birrell writes: > If -pthread is intended as a standard FSF gcc option, then it should be mapped > to a NOOP for FreeBSD IMO. [...] > So a NOOP is best. Change gcc in the FSF sources when appropriate, but let > -current have the change now. Ah, I could fully support this esp. if it allowed us to build shared libraries in ports on FreeBSD which defer selection of the thread library until run-time link and/or the final application link. I know this works fine with one-off tweaking of a shared library's code base. I don't know if it is possible to do without per-library code changes. In the alternative (if cleaner from ELF perspective), could we make plain -pthread always link weak against the prototype API for POSIX threads. Then people just pre-load (aka set LD_PRELOAD , see rtld(1)) the thread library they actually want for the run-time link. People could also add -lkse, etc to early bind a concrete implementation of the thread library or for static link situations. Thank you guys for rethinking a bit. As a side bonus, this would be a nice win over having to (re-)build the entire ports in lock-step just to test for best performing thread library. Regards, Loren