Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2001 10:31:36 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        current@freebsd.org
Subject:   Re: New threads way questions
Message-ID:  <Pine.SUN.3.91.1010131101918.10399A@pcnet1.pcnet.com>
In-Reply-To: <20010131174457.A19255@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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
eventually.

> 3) Is -D_THREAD_SAFE required now?

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

-- 
Dan Eischen


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?Pine.SUN.3.91.1010131101918.10399A>