Recent libstdc++ regression on i686-linux: abi/cxx_runtime_only_linkage.cc

Sebastian Redl sebastian.redl@getdesigned.at
Fri Aug 22 17:35:00 GMT 2008


Paolo Carlini wrote:
> I think you should consider also the option of having less stuff 
> exported from libsupc++: if you somehow manage to have the different 
> code paths in the headers
That's impossible without exposing unwind-cxx.h to the public, and 
that's a can of worms I don't even want to look at, much less open. The 
reference counting must act on the count in the __cxa_exception_header 
object, and that structure is strictly internal.

The problem is that the core exception mechanism 
(__gxx_exception_cleanup, to be specific) needs the atomic instruction. 
This means that if the target doesn't have support for it, you'd need a 
different libsupc++. You can't have the same libsupc++ for i386 and i486 
if one has exception_ptr and the other doesn't. Doing this thing 
conditionally is just not possible, in my opinion.


Meanwhile, I'm looking at the __exchange_and_add implementation. This is 
quite a hack: it's implemented in a "header" file in 
config/cpu/<arch>/atomicity.h, but then src/Makefile.am creates a 
symlink in the target directory that it calls atomicity.cc, and compiles 
that.

I think that hack could be simply moved to libsupc++/Makefile.am, though.

Sebastian



More information about the Libstdc++ mailing list