From owner-freebsd-ports Wed Jan 24 10:32:27 2001 Delivered-To: freebsd-ports@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 026A337B402; Wed, 24 Jan 2001 10:32:08 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.1/8.11.1) id f0OIVn528052; Wed, 24 Jan 2001 12:31:49 -0600 (CST) (envelope-from dan) Date: Wed, 24 Jan 2001 12:31:48 -0600 From: Dan Nelson To: Daniel Eischen Cc: Alfred Perlstein , current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: HEADS UP: libc/libc_r changes require rebuild of threaded apps Message-ID: <20010124123147.A2215@dan.emsphone.com> References: <20010124084058.S26076@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.13i In-Reply-To: ; from "Daniel Eischen" on Wed Jan 24 12:36:17 GMT 2001 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In the last episode (Jan 24), Daniel Eischen said: > On Wed, 24 Jan 2001, Alfred Perlstein wrote: > > * Daniel M. Eischen [010124 05:26] wrote: > > > As discussed a few days ago, I've just committed the changes to libc > > > and libc_r to allow them to be linked together via -lc_r. If you're > > > running -current and have any threaded apps built using libc_r.so.5, > > > you'll need to rebuild them without the -pthread option using -lc_r. > > > > > > For porters, the __FreeBSD_version has been bumped to 500016 to > > > reflect the above change. > > > > This is ambiguous, can you provide old/new examples of how to > > compile/link a single C source file? > > What's not clear ;-) Use -lc_r instead of -pthread. > > gcc -Wall -o foo foo.c -lc_r > > The old way was: > > gcc -Wall -D_THREAD_SAFE -o foo foo.c -pthread I thought the old way was just -pthread, and it would handle everything. I did a quick scan of the devel/ and net/ branches of our ports tree, and of 43 thread-using ports, 36 of the ports simply add -pthread. Only 7 also add -D_THREAD_SAFE. The only usage of _THREAD_SAFE in /usr/include is redefinition of feof, ferror, clearerr, and fileno to *_unlocked. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message