From owner-freebsd-current Wed Jan 31 7:32:23 2001 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 86C1837B491 for ; Wed, 31 Jan 2001 07:32:05 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id KAA12435; Wed, 31 Jan 2001 10:31:36 -0500 (EST) Date: Wed, 31 Jan 2001 10:31:36 -0500 (EST) From: Daniel Eischen To: "Andrey A. Chernov" Cc: current@freebsd.org Subject: Re: New threads way questions In-Reply-To: <20010131174457.A19255@nagual.pp.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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