This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH: Re: eh_globals.cc compilation errors with -threads under hpux 10.20
- To: libstdc++ at gcc dot gnu dot org, dave dot anglin at nrc dot ca
- Subject: Re: PATCH: Re: eh_globals.cc compilation errors with -threads under hpux 10.20
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Wed, 23 May 2001 11:14:48 -0500 (CDT)
- References: <200105222149.RAA11651@hiauly1.hia.nrc.ca>
- Reply-to: rittle at labs dot mot dot com
[...]
> some duplication and inconsistency.
OK, I would agree that the configuration of the STL component is
somewhat of a mess at the moment (I think I almost understand it after
working out libstdc++-v3's performance problem with standard
containers - see http://gcc.gnu.org/ml/libstdc++/2001-05/msg00136.html).
>> Notice that _PTHREADS is defined in ./config/threads-posix.h after it
>> included ./include/bits/c++config.h (which checked for that macro being
>> defined)...
> I didn't notice this problem but it further confirms that threads-posix.h
> shouldn't muck with a define that is normally a compiler define.
But, I'm not sure I read it this way. I could be convinced that you
are right. Who says that _PTHREADS is a compiler define? I have the
_Programming with POSIX Threads_ book on my shelf (but I don't have
the official POSIX standard in this area) and it makes no mention of
_PTHREADS. Given the name appears to be in library implementor space,
it seems that we in libstdc++ and/or in conjunction with the system
libraries own it not the compiler unless we set a gcc convention that
does not currently exist. Here is my proof that it is not currently a
gcc convention to define that symbol "in the compiler":
; grep PTHREADS `{find . -type f}
./i386/sol2.h: %{pthreads:-D_REENTRANT -D_PTHREADS} \
./sh/linux.h: %{pthread:-D_REENTRANT -D_PTHREADS}"
./sparc/sol2.h:%{pthreads:-D_REENTRANT -D_PTHREADS} \
Three ports define it the way we want to believe is best (see, I'm
really with you on this). But even those three don't spell the option
the same, etc.
BTW, none of this is to say that I would not support making gcc
declare _GCC_PTHREADS (and _PTHREADS and other symbols, if required
for a given port's headers) when -pthread was provided by the user and
making -pthread an option for all POSIX thread-capable ports. I have
supported basically that position for years. Who do we have to
convince?