This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Soliciting help with libstdc++ and exceptions
> My Debian (potato) library was presumably built with --enable-threads,
> but my test snapshot of gcc was not.
That would explain the difference to what I am seeing.
> Surely we want people to be *able* to build test versions of gcc, both
> with and without --enable-threads, that work without static linking on
> systems with arbitrary configurations.
I'm not so sure about that. I'd propose that configure prints a
message if gcc is configured without --enable-threads on Linux.
People can still configure the compiler without this option for
testing, but they are on their own then. For example, in certain
cases, they may have to use the -Wl,-u hack, or rebuild their C
library. On a Linux system, --enable-threads does not do any harm,
thanks to the weak references.
Anyway, I FOUND the difference that is causing the problems (I
believe). Looking at frame.h, we see
typedef struct frame_state
{
void *cfa;
void *eh_ptr;
long cfa_offset;
long args_size;
long reg_or_offset[FIRST_PSEUDO_REGISTER+1];
unsigned short cfa_reg;
unsigned short retaddr_column;
char saved[FIRST_PSEUDO_REGISTER+1];
} frame_state;
This hasn't changed in ages. However, looking at i386.h, we see that,
in egcs_1_1_2_release (and 2.95), it is
#define FIRST_PSEUDO_REGISTER 17
whereas in the mainline gcc, it is
#define FIRST_PSEUDO_REGISTER 19
That changes the layout of frame_state quite a bit, and in turn, also
the calling convention for __frame_state_for. Please let me know that
I'm missing something ...
Regards,
Martin