On Wed, 31 Jan 2001, Andrey A. Chernov wrote:
> I have some questions about new threads way. Daniel says that new way is:
> > gcc -Wall -o foo foo.c -lc_r

Only in -current, in -stable continue to use -pthread instead of -lc_r.

> 1) What about libgcc_r.a? Is it picked automatically in this case or
> not? Is it ever needed now?

libgcc_r is gone in both -current and -stable.  There is only libgcc.a.
libgcc_r may still exist for sometime until folks manually delete it,
so ports that are built to require it (-lgcc_r) will work on some
systems and fail on others.

> 2) Is new way is backward-compatible with old way? I.e. can we just change
> ports to use new way and assume that still works on -stable?

No, -lc_r will not work under -stable.

What might make sense is to have a bsd.port.mk knob, THREADSLIB
or something like that, that can be automatically set to -lc_r
under -current or -pthread under stable.  When we get a libpthread,
or even if users want to use LinuxThreads, they can change this
knob in /etc/make.conf and have their ports built with whatever
threads library they want.

Under -current, -pthread has been changed to Do The Right Thing
and link in both libc_r and libc.  All ports should work without
changing them under -current, at least for now.  But the -pthread
option should go away at some point, so ports need to be changed

> 3) Is -D_THREAD_SAFE required now?

Not in -current.  You should use it in -stable though.

Dan Eischen

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to