public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: G++ linker warnings on i386-cygwin32
@ 1997-08-31 23:12 Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 1997-08-31 23:12 UTC (permalink / raw)
  To: egcs

	/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
	2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
	 has different size

I am speculating here, but I suspect this has to do with the fact that
some C++ runtime routines, include RTTI support, were moved from libstdc++
to libgcc, and the fact that cygwin.dll contains some C++ code, and hence
was linked against libstdc++ when it was created.  The result is that we
now have two copies of some libstdc++ routines, one in the cygwin.dll
shared library, and one in the libgcc.a library.

Or alternatively, the problem could be that the copy of libstdc++ linked
into cygwin.dll is different from the copy of libstdc++ that is included
with EGCS, and that they are somehow conflicting.

It is possible that the cygwin (winsup) sources will need to be modified to
be aware of the new libstdc++/libgcc structure.

Since we are using essentially the same gcc sources as the cygwin releases,
I suspect that this problem will go away with the next cygwin release.

	 -lstdc++ -lm -lgcc -lcygwin -lkernel32 -lgcc

This is the order that gcc is linking in the libraries.  It is optionally
taking some functions from -lgcc which are otherwise undefined, and then there
are definitions in cygwin which it must take because it is a shared library,
resulting in redefinitions.  You might try hacking this to add a -lcygwin
before the first -lgcc.  If my first theory above is right, then this might
fix the problem.

Jim

^ permalink raw reply	[flat|nested] 2+ messages in thread

* G++ linker warnings on i386-cygwin32
  1997-08-27 15:31 A gcc Makefile patch H.J. Lu
@ 1997-08-27 16:44 ` Jan-Jaap van der Heijden
  0 siblings, 0 replies; 2+ messages in thread
From: Jan-Jaap van der Heijden @ 1997-08-27 16:44 UTC (permalink / raw)
  To: egcs

I built egcs-970825 as an i386-linux-gnulibc1 -> i386-cygwin32 cross.

I noticed it installs the collect2 linker, though cygwin32 uses GNU ld.

Most annoyning, compiling a trivial C++ program:

----------------------
#include <iostream.h>

int main(void)
{
  cout << "Hello World!\n";
}
----------------------

gives me a few screens of linker warnings:

[janjaap@ZOO-station src]$ i386-cygwin32-g++ -v -o hello.exe hello.cc
Reading specs from /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02/specs
gcc version egcs-2.90.02 970825 (gcc2-970802 experimental)
 /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02/cpp -lang-c++ -v -undef -D__G
NUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Di386 -D_WIN32 -DPOSIX 
-D__CYGWIN32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdc
all__)) -D__cdecl=__attribute__((__cdecl__)) -D__i386__ -D_WIN32 -D__POSIX__ -D
__CYGWIN32__ -D__WINNT__ -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__st
dcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__i386 -D__POSIX -D__WINNT -As
ystem(winnt) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -Di386 -Asystem(unix) -
Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386
) hello.cc /tmp/cca28504.ii
GNU CPP version egcs-2.90.02 970825 (gcc2-970802 experimental) (80386, BSD synt
ax)
#include "..." search starts here:
#include <...> search starts here:
 /opt/egcs/include/g++
 /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02/include
 /opt/egcs/i386-cygwin32/include
End of search list.
 /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02/cc1plus /tmp/cca28504.ii -qui
et -dumpbase hello.cc -version -o /tmp/cca28504.s
GNU C++ version egcs-2.90.02 970825 (gcc2-970802 experimental) (i386-cygwin32) 
compiled by GNU C version egcs-2.90.02 970825 (gcc2-970802 experimental).
 /opt/egcs/i386-cygwin32/bin/as -o /tmp/cca285041.o /tmp/cca28504.s
 /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02/ld -o hello.exe /opt/egcs/i38
6-cygwin32/lib/crt0.o -L/opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.02 -L/opt
/egcs/i386-cygwin32/lib /tmp/cca285041.o -lstdc++ -lm -lgcc -lcygwin -lkernel32
 -lgcc
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo.o): warning: duplicate section `.data$_vt$17__class_type_info'
 has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(tinfo2.o): warning: duplicate section `.data$_vt$17__array_type_info
' has different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(exception.o): warning: duplicate section `.data$_vt$10bad_typeid' ha
s different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(exception.o): warning: duplicate section `.data$_vt$10bad_typeid' ha
s different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(exception.o): warning: duplicate section `.data$_vt$10bad_typeid' ha
s different size
/opt/egcs/i386-cygwin32/bin/ld: /opt/egcs/lib/gcc-lib/i386-cygwin32/egcs-2.90.0
2/libgcc.a(exception.o): warning: duplicate section `.data$_vt$10bad_typeid' ha
s different size

Removing the collect2 linker doesn't help. Anybody got a clue?

JJ
---
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  -- RFC1925.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-08-31 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-31 23:12 G++ linker warnings on i386-cygwin32 Jim Wilson
  -- strict thread matches above, loose matches on Subject: below --
1997-08-27 15:31 A gcc Makefile patch H.J. Lu
1997-08-27 16:44 ` G++ linker warnings on i386-cygwin32 Jan-Jaap van der Heijden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).