From owner-freebsd-current Thu Oct 31 15:24:47 2002 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 C803337B401 for ; Thu, 31 Oct 2002 15:24:45 -0800 (PST) Received: from ftpbox.mot.com (ftpbox.mot.com [129.188.136.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 022AF43E42 for ; Thu, 31 Oct 2002 15:24:45 -0800 (PST) (envelope-from rittle@latour.rsch.comm.mot.com) Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by ftpbox.mot.com (Motorola/Ftpbox) with ESMTP id g9VNOi5L004408; Thu, 31 Oct 2002 16:24:44 -0700 (MST) Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by mothost.mot.com (MOT-pobox 2.0) with ESMTP id QAA23483; Thu, 31 Oct 2002 16:24:44 -0700 (MST)] Received: from latour.rsch.comm.mot.com (localhost.rsch.comm.mot.com [127.0.0.1]) by latour.rsch.comm.mot.com (8.12.6/8.12.6) with ESMTP id g9VNOZGC073060; Thu, 31 Oct 2002 17:24:35 -0600 (CST) (envelope-from rittle@latour.rsch.comm.mot.com) Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.12.6/8.12.6/Submit) id g9VNOJJ1073055; Thu, 31 Oct 2002 17:24:19 -0600 (CST) Date: Thu, 31 Oct 2002 17:24:19 -0600 (CST) From: Loren James Rittle Message-Id: <200210312324.g9VNOJJ1073055@latour.rsch.comm.mot.com> To: davidc@issci.ca Cc: current@FreeBSD.ORG In-reply-to: <20021031111244.A88717@newton.issci.ca> (message from Chad David on Thu, 31 Oct 2002 11:12:44 -0700) Subject: Re: Objective-C threads Reply-To: rittle@labs.mot.com References: <200210310347.g9V3l2hw006240@latour.rsch.comm.mot.com> <20021031111244.A88717@newton.issci.ca> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20021031111244.A88717@newton.issci.ca>, Chad David writes: >> Use thr-objc not thr-posix. thr-objc maps to the gcc generic thread >> abstration layer and is better supported these days. It will also >> correctly disable overhead related to threading when a program is >> single-threaded using weak symbols. thr-posix doesn't do that... > I've been trying to get it to work with weak symbols, but have not had > any luck yet. I'm pretty sure I'm just missing something simple, but > if you have a working config for FreeBSD I'd love to see it. (I could tar up a built copy if you want to look at a stable configuration, but it is based on FSF configure not FreeBSD /usr/src Makefiles; however it should be easy for you to get to that point yourself.) > The current situation doesn't seem optimal, ie. requiring -pthread for > none threaded programs. There is also the issue of config.h.in, which > needs to become config.h. This shouldn't be a big deal, I'm just not > sure what the prefered method is (just repo copy it?). Sorry, I don't use/support ObjC at all, however gcc 3.2 doesn't require -pthread to link a single-threaded program when built using the FSF configure-generated Makefiles which build against thr-objc (gcc 3.[01].X should have all been similar). To wit: nm /usr/local/lib/libobjc.a|grep pthread w pthread_attr_destroy [...] w pthread_setspecific My only advise might be: A lot of configuration stuff regarding libobjc has subtly changed in the FSF tree, perhaps you should attempt to build a copy using the standard FSF configure technique then resync the master FreeBSD Makefiles for that package. Regards, Loren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message