problems compiling gcc 2.95.[12] for sparc64-linux using --with-cpu=sparc

Martin v. Loewis
Sun Oct 31 01:30:00 GMT 1999

> /usr/lib/gcc-lib/sparc-linux/2.95.2/ undefined reference to `bad_alloc virtual table'
> /usr/lib/gcc-lib/sparc-linux/2.95.2/ undefined reference to `exception virtual table'
> This is a problem in how C++ code is compiled, since using this library
> with a known good compiler, works fine, and using a known good library
> works fine with this compiler (except that new code is still broken, and
> it seems to be mainly PIC related).

It does not look like this problem is related to PIC, sparc64, or any
other architecture specifics. These symbols *should* be defined in
libgcc.a; please verify that they are.

Also, don't link libstdc++ to you application explicitly; use the
'g++' driver instead.

If you find that the symbols are indeed in libgcc.a, please provide
the output of a linker run, giving '-v' to the compiler.


More information about the Gcc-bugs mailing list