Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 1999 07:03:54 -0400
From:      "David E. Cross" <crossd@cs.rpi.edu>
To:        Dan Moschuk <dan@trinsec.com>
Cc:        "David E. Cross" <crossd@cs.rpi.edu>, hackers@freebsd.org, crossd@cs.rpi.edu
Subject:   Re: -lpthread 
Message-ID:  <199904201103.HAA14512@cs.rpi.edu>
In-Reply-To: Message from Dan Moschuk <dan@trinsec.com>  of "Tue, 20 Apr 1999 02:06:55 EDT." <19990420020654.A51944@trinsec.com> 

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

--
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?199904201103.HAA14512>