Date: Fri, 08 Feb 2002 10:16:32 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Maxim Sobolev <sobomax@FreeBSD.org> Cc: jlemon@FreeBSD.org, hackers@FreeBSD.org, jasone@FreeBSD.org, deischen@FreeBSD.org, jdp@FreeBSD.org, "M. Warner Losh" <imp@village.org>, Stephen Montgomery-Smith <stephen@math.missouri.edu> Subject: Re: Linking libc before libc_r into application causes weirdprob Message-ID: <XFMail.020208101632.jhb@FreeBSD.org> In-Reply-To: <3C639855.DA710095@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08-Feb-02 Maxim Sobolev wrote: > Stephen Montgomery-Smith wrote: >> >> "M. Warner Losh" wrote: >> > >> > Confirmed. test.c appears to work properly when compiled: >> > >> > cc -o test test.c -pthread >> > ./test >> > >> > Generally speaking, if you want to add -lc_r, you are doing things >> > incorrectly. I've done way to much building... In FreeBSD 3.x you >> > did need to do -lc_r, but that was changed to -pthread in 4.0. >> > >> > Warner >> > >> >> According to the man page for gcc, you are supposed to write >> >> cc -o test test.c -pthread -D_THREAD_SAFE >> >> or am I misunderstanding something? > > In 5.0-CURRENT -pthread was replaced by -lc_r. No, that's just how it is currently implemented. Ultimately it will be -lpthread. And when that happens, you will need to link -lpthread in before -lc just like you would need to now with -lc_r. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020208101632.jhb>