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]

Re: PATCH: Re: eh_globals.cc compilation errors with -threads under hpux 10.20


In article <200105232200.SAA21407@hiauly1.hia.nrc.ca>,
"John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:

> I have been working on this most of the day trying to adopt the
> configuration technique used in libobjc.  I don't think it will be
> necessary to adjust c++config.  I am to the point where things build
> and I believe that I am now extracting the needed target
> configuration information from the gcc source and build directories.

Excellent.

> I am currently testing and I think we do probably need THREADS_FLAGS to
> get the proper linkage in the testuite for many ports.

libobjc doesn't need this because it uses the gthr.h abstraction layer
properly.  We should copy that form, if at all possible since...

> I am wondering if there is a better way to determine what is needed.
> My patch also doesn't set the flags for the deja harness.  So, I
> need to figure out how to do that.

I don't think you should do this.

...on ports that do weak symbols properly, the correct way to handle
this IMHO, is to build libstdc++-v3 in a manner that the user can
optionally add the threading flags.  Users can then run dejagnu
against the library with and without the threading flags (by setting
up RUNTESTFLAGS properly before they run ``make check'' at the
top-level).

...on ports that support multilib'ing the threading support, they are
already setup to test things with the required flags and/or they can
run the testsuite under multiple configurations as above.

> I think I now have resolved this problem.  We need to include "tconfig.h".

OK, instead of doing a configuration patch myself, I am completely
happy to comment on yours.  Here is my first comment (;-):

You should not include gcc/tconfig.h in library sources.

Or, at least, if you do, to get the effect you desire, you need to
define IN_GCC which is a complete lie and libstdc++-v3 would be the
first library to do that...

Regards,
Loren


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