[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shared libraries and _REENTRANT



On Fri, Jun 22, 2007 at 02:11:25PM -0400, Felipe Sateler wrote:
> Policy 10.2 says we must compile shared libraries with -D_REENTRANT:
> 
> > You must specify the gcc option -D_REENTRANT when building a library
> > (either static or shared) to make the library compatible with
> > LinuxThreads.  
> 
> However, LinuxThreads has been superseeded by NPTL. Is this still necessary?
I think Michael Kerrisk of man-pages upstream may have wondered the
same thing?

> Also, when a library ships a .pc file, should it include the option in its
> CPPFLAGS?
It's only necessary for compilation of libraries since they might be
linked to apps or other libraries which are threaded.  So it should
probably not be specified in .pc which would make all apps/libs use
it.

Justin



Reply to: