This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ problems /w egcs-2.91.52 on sparc-linux?
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: libstdc++ problems /w egcs-2.91.52 on sparc-linux?
- From: Kevin Milans <kmilans at CapAccess dot org>
- Date: Fri, 31 Jul 1998 00:35:58 -0400 (EDT)
- cc: egcs at cygnus dot com
On 29 Jul 1998, Jason Merrill wrote:
>
> Looks like some of your code is being compiled with -fvtable-thunks, and
> some without. This needs to be consistent.
>
> Jason
>
I've checked and all the code is compiled with -fvtable-thunks. The
actual undefined reference occurs in egcs/libio/stdstrbufs.cc. When
I make the following change to that file, all linking errors go away.
However, cout fails to produce any output in programs linked against
this library. This is the case for both egcs-2.91.52 as well as
egcs-1.0.3a.
--- stdstrbufs.cc-orig Thu Jul 30 00:28:04 1998
+++ stdstrbufs.cc Thu Jul 30 17:19:40 1998
@@ -35,7 +35,7 @@
#if !defined(filebuf_vtable) && defined(__cplusplus)
#ifdef __GNUC__
extern char filebuf_vtable[]
- asm (_G_VTABLE_LABEL_PREFIX
+ asm ("__vt_"
#if _G_VTABLE_LABEL_HAS_LENGTH
"7"
#endif
If I understand things correctly, the script gen-params is actually
supposed to define _G_VTABLE_LABEL_PREFIX, but for some reason
this is defined as "_vt." when compiling. It looks like
gen-params defines things correctly; the output of gen-params contains
the line
#define _G_VTABLE_LABEL_PREFIX "__vt_"
among others. At any rate, cout still doesn't work even when
hardcoding the "__vt_" into stdstrbuffs.cc. Anyone know what could
be wrong with cout, as well as how _G_VTABLE_LABEL_PREFIX got messed
up? This all is true for the latest CVS tree as well as the egcs-1.0.3a
release.
Thanks,
Kevin