From owner-freebsd-threads@FreeBSD.ORG Sat Sep 20 11:45:07 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 460C716A501; Sat, 20 Sep 2003 11:45:07 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7C8243FF5; Sat, 20 Sep 2003 11:45:04 -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 h8KIj3gG020047; Sat, 20 Sep 2003 14:45:03 -0400 (EDT) Date: Sat, 20 Sep 2003 14:45:02 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Will Andrews In-Reply-To: <20030920164756.GL47671@procyon.firepipe.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: kde@freebsd.org Subject: Re: [kde-freebsd] Compiling arts in -CURRENT without -pthread 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: Sat, 20 Sep 2003 18:45:07 -0000 On Sat, 20 Sep 2003, Will Andrews wrote: > On Sat, Sep 20, 2003 at 10:53:04AM -0400, Daniel Eischen wrote: > > Yes, that's really strange. Are you sure that you have a correct > > libc_r in /usr/lib? You seem to be building arts in the correct > > manner, and -lc_r _should_ work. > > Dan, if PTHREAD_LIBS isn't defined, what library should 5.1C apps > fall back to? It seems my 5.1C (2003/09/19) system does not have > a libpthread, which I thought it was supposed to. So, please, > tell me what a reasonable "default" would be to use if > PTHREAD_LIBS is not defined. Is it -lkse? It should probably check for: 1) PTHREAD_LIBS 2) -lpthread 3) -lc_r in that order. I think we want to be like other OSs that have libpthread, Solaris for example, with the exception that we check to see if PTHREAD_LIBS is defined and use that in preference to the others. Solaris has both libpthread and libthread, but libthread exports different symbols (thr_* instead of pthread_*), so its probably explicitly selected rather than automagically selected. No, we don't have libpthread yet. We are waiting for ports to catch up to the PTHREAD_LIBS changes and then libkse will be renamed back to libpthread. If we change it now, some ports may be unbroken because they find -lpthread, but yet may still half-heartedly support PTHREAD_LIBS. So setting PTHREAD_LIBS to something other than libpthread won't break the port but will cause it not to run correctly (if at all). We also want to be able to select any of our threading libraries regardless of the existence of -lpthread, so falling back to -lpthread should probably only happen when building outside the ports system (PTHREAD_LIBS not defined). > Why is FreeBSD not exporting an -lpthread like others seem to be? To help you guys. Just like removing -pthread ;-) -- Dan Eischen