From owner-freebsd-threads@FreeBSD.ORG Thu Aug 28 22:28:20 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 9C2AA16A4BF for ; Thu, 28 Aug 2003 22:28:20 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E319543FA3 for ; Thu, 28 Aug 2003 22:28:19 -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 h7T5SJtp012884; Fri, 29 Aug 2003 01:28:19 -0400 (EDT) Date: Fri, 29 Aug 2003 01:28:19 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: "=?iso-8859-1?q?Pedro=20F.=20Giffuni?=" In-Reply-To: <20030829042613.80458.qmail@web13406.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: Fri, 29 Aug 2003 05:28:20 -0000 On Fri, 29 Aug 2003, [iso-8859-1] Pedro F. Giffuni wrote: > Hi guys; > > First of all congratulations to all the people involved in the new thread > support! > > I'm not understanding what the new world order will be, but please try to agree > something with the autoconf people: from my porting experience, autoconf is not > interested on what PTHREAD_LIBS says; it just tries to link with pthread and if > that fails it assumes the platform doesn't support threads at all. -pthread is currently a compiler switch, and we (FreeBSD) are one of the very few OSes that have such an option. It was only there to prevent linking to libc in FreeBSD-[34]; otherwise it would not exist. Do not confuse -pthread with -lpthread or -lthr/-lkse/-llinuxthreads/-lwhatever. If autoconf has been taught that FreeBSD has -pthread, then it will have to be untaught. Eliminating -pthread will expose those ports that use it and then they can be fixed. If left in and we try to link with libpthread,libkse,libthr, etc, we will end up with ports that link to one of those libraries _and_ libc_r. Just try copying libkse or libthr to libpthread _without_ changing PTHREAD_LIBS (so you still use libc_r) and rebuilding X or KDE. Those ports will end up detecting libpthread and linking to it, and they will still also link to libc_r. This will not work but you won't know it until you try running the port and wacky weirdness ensues. -- Dan Eischen