Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2002 17:24:19 -0600 (CST)
From:      Loren James Rittle <rittle@latour.rsch.comm.mot.com>
To:        davidc@issci.ca
Cc:        current@FreeBSD.ORG
Subject:   Re: Objective-C threads
Message-ID:  <200210312324.g9VNOJJ1073055@latour.rsch.comm.mot.com>
In-Reply-To: <20021031111244.A88717@newton.issci.ca> (message from Chad David on Thu, 31 Oct 2002 11:12:44 -0700)
References:  <200210310347.g9V3l2hw006240@latour.rsch.comm.mot.com> <20021031111244.A88717@newton.issci.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20021031111244.A88717@newton.issci.ca>,
Chad David<davidc@issci.ca> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210312324.g9VNOJJ1073055>