From owner-freebsd-current@FreeBSD.ORG Tue Sep 23 09:03:43 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 85D8C16A4B3 for ; Tue, 23 Sep 2003 09:03:43 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB94A43FBF for ; Tue, 23 Sep 2003 09:03:41 -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.10/8.12.1) with ESMTP id h8NG3fgG000131; Tue, 23 Sep 2003 12:03:41 -0400 (EDT) Date: Tue, 23 Sep 2003 12:03:41 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Loren James Rittle In-Reply-To: <200309231545.h8NFjMVV027788@latour.rsch.comm.mot.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Fixing -pthreads (Re: ports and -current) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 16:03:43 -0000 On Tue, 23 Sep 2003, Loren James Rittle wrote: > > I'm all for removing it, but our FSF GCC maintainer thought > > it better to make it a NOOP. We're just going by his advice. > > I agreed that making -pthread == NOOP was probably better than the > ~Sept 5 -CURRENT system compiler however that was not my full advice. > > In my view (and thus my advice), it is the stated collective opinion > of the FSF gcc development team that -pthread should exist for all gcc > ports which support POSIX threads. This is true even if not well > documented. It would be best if adding the switch actually implied > everything to support threads. > > If adding the -pthread switch is a NOOP to gcc but users could later > add (e.g.): LD_PRELOAD=libc_r.so (or one of the newer choices) and not > break anything, then I think that would be fully acceptable and meet > the specification of the switch. This would be very cool in that you > could test/run against multiple thread libraries without a re-link. Yes, and I agree. If someone were to tell me how to implement that, I would do it. If it is just a matter of adding some missing pthread interfaces as stubs to libc, then it is pretty simple. > If adding the -pthread switch is a NOOP to gcc but users must also add > -lc_r (or one of the newer choices) for correct operation, then I > think making it a NOOP is a bad idea and I attempted to state so. Well, if they don't use LD_PRELOAD=libc_r.so or whatever and try to run the application, it isn't going to work very well using pthread stubs. -- Dan Eischen