This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
-pthread switch and binary compatibility.
- From: "John Maddock" <john at johnmaddock dot co dot uk>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 15 Apr 2008 19:15:43 +0100
- Subject: -pthread switch and binary compatibility.
Hi there,
Over at the Boost C++ libraries project we're trying to decide what is the
correct thing to do when code is compiled with -pthread or not.
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?
I guess this boils down to whether there is any code in libstdc++ that
behaves differently depending on whether _REENTRANT is #defined?
If the answer is yes, then is it commonplace to link object files compiled
with and without -pthread?
Basically we're trying to decide whether to try and ensure that object files
compiled with and without -pthread are always binary compatible, or whether
to turn threading support on *only* when -pthread is specified (and
_REENTRANT gets #defined).
Many thanks for your help,
John Maddock.