This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -pthread switch and binary compatibility.


Hello John,

> The crux of the issue is this: if libstdc++ is configured with the pthread
> threading model, then are object files always binary compatible irrespective
> of whether they are compiled with the -pthread command line option or not?

Sorry for the delay in answering this simple question.  The short
answer is that the library (libstdc++-v3) itself is designed and
implemented to allow compilation/linking with or without -pthread
(when the target platform itself supports weak symbols) even when it
was configured to use e.g. the posix thread model.  This might be
broken on any particular target for reasons outside the control of the
library (i.e.  system headers or libraries).  The FAQ for libstdc++-v3
has more details.

(This area of the library implementation has been revised extensively
 since I worked on it in 2001-2002 and we collectively defined the
 related design rules on this mailing list however the rule remains.)

Regards,
Loren


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]