Date: Tue, 20 Apr 1999 08:11:53 -0400 From: "David E. Cross" <crossd@cs.rpi.edu> To: "Richard Seaman, Jr." <dick@tar.com> Cc: "David E. Cross" <crossd@cs.rpi.edu>, Dan Moschuk <dan@trinsec.com>, hackers@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: -lpthread Message-ID: <199904201211.IAA15751@cs.rpi.edu> In-Reply-To: Message from "Richard Seaman, Jr." <dick@tar.com> of "Tue, 20 Apr 1999 06:50:29 CDT." <19990420065029.G533@tar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Tue, Apr 20, 1999 at 07:03:54AM -0400, David E. Cross wrote: > > > | Can we have it so that '-lpthread' accomplishes the same as '-lc_r' in > > > | terms of allowing threaded programs to link/run correctly? As was pointed > > > | out to me recently '-lc_r' for pthread support is a bit non-standard. > > > > > > What's wrong with the -pthread option to gcc? (egcs as well?) > > > > >From FreeBSD: > > A FreeBSD specific option ... gcc -pthread .... > > ^^^^^^^^^^^^^^^^ > > >From Solaris 2.6: > > POSIX > > cc [ flag ... ] file ... -lpthread [ library ... ] > > ^^^^^^^^^ > > >From Irix 6.5.2f: > > cc -D_POSIX_C_SOURCE=199506L app.c -llib0 -llib1 ... -lpthread > > ^^^^^^^^^ > > It was just brought to my attention that our use of -lc_r was non-standard. > > Solaris, Irix, Linux, and I believe even AIX all use -lpthread. > > Its my understanding that the goal, though now delayed for a long time, > is that the FreeBSD user threads would eventually be re-implemented as > kernel threads and be placed in libpthread. I understood that the > libpthread name was reserved for this migration. > > Also, in most implementations, -lpthread is in addition to -lc, whereas > in the FreeBSD user thread library, -lc_r replaces -lc as well as -lpthread. > What you suggest would make a lot more sense if libc_r was pulled apart > into separate libc and libpthread libraries. It wouldn't be hard to do > with the current setup. I know this is a kludge, but it appears that a simple symlink from libc_r.* to libpthread.* would accomplish this. My only goal is to make us "more standard". -- David Cross | email: crossd@cs.rpi.edu Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD 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?199904201211.IAA15751>