In article <[EMAIL PROTECTED]>,
Chad David<[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to