Subject: Re: -pthread switch and binary compatibility.
From: "Loren James Rittle" <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Date: Thu, 24 Apr 2008 14:35:30 -0500 (CDT)
List-Id: <libstdc++.gcc.gnu.org>

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

-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.4/1394 - Release Date: 23/04/2008 19:16