Newsgroups: gnu.g++.bug Path: sparky!uunet!cis.ohio-state.edu!ukcsd.UK.SUn.COM!jeremy From: jer...@ukcsd.UK.SUn.COM (Jeremy Allison - Sun UK - Tech Support) Subject: gcc-2.0 bug Message-ID: <kqkdteINNhfm@cronkite> Sender: gnuli...@ai.mit.edu Reply-To: Jeremy.Alli...@uk.sun.com Organization: Sun Microsystems UK Answer Centre Distribution: gnu Date: Tue, 25 Feb 1992 12:33:50 GMT Approved: bug-...@prep.ai.mit.edu Lines: 71 Firstly I'd like to say a _BIG_ thanks to GNU & FSF for writing and publishing this code - it's the only way someone with a sun386i can get up to date software tools. I have discovered a problem with the c++ part of gcc-2.0, whilst porting the libg++ 1.39.0 library to gcc-2.0. Firstly I removed all the #pragma once's from the library header code, then patched up the definitions of memcpy and strlen in the header files to match the internal ones (so I stopped getting the error messages). The src make went fine - producing a libg++.a, and indeed, if I link against this with a "Hello World" program everything is fine, however, on make'ing the test directory I find that linking stops with some undefined references - in particular the tRandom test. Here is the error message when making this explicitly. g++ tRandom.o -o tRandom -Wall -v -L../src -lg++ -lm Reading specs from /usr/local/lib/gcc/sun386i/2.0/specs gcc version 2.0 /usr/local/lib/gcc/sun386i/2.0/ld -e _start -dc -dp -o tRandom /lib/crt0.o \ -L../src -L/usr/local/lib/gcc/sun386i/2.0/ -L/usr/local/lib/gcc/ \ -L/usr/local/lib/ tRandom.o -lg++ -lm -lg++ -lgcc -lc -lgcc ld: Undefined symbol _3RNG$singleMantissa _3RNG$doubleMantissa collect: /usr/bin/ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `tRandom' On investigation I have found this to be caused by gcc2.0 failing to output definitions for static member data declatations in a class. The other link failures I have are also due to this - looking at the assembler files produced show references to these static member data items in the code but no declarations for them. The .cc file in question in the libg++ source directory is RNG.cc. The #pragma settings are #pragma implementation in the RNG.cc file, and #pragma interface in the RNG.h file. The output when make'ing RNG.o is :- make RNG.o g++ -I../g++-include -O -fstrength-reduce -felide-constructors -fsave-memoized -Wall -v -c RNG.cc Reading specs from /usr/local/lib/gcc/sun386i/2.0/specs gcc version 2.0 /usr/local/lib/gcc/sun386i/2.0/cpp -lang-c++ -v -I../g++-include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dunix -Di386 -Dsun386 -Dsun -D__unix__ -D__i386__ -D__sun386__ -D__sun__ -D__unix -D__i386 -D__sun386 -D__sun -D__OPTIMIZE__ -Wall RNG.cc /usr/tmp/cca19237.cpp GNU CPP version 2.0 (80386, Sun syntax) /usr/local/lib/gcc/sun386i/2.0/cc1plus /usr/tmp/cca19237.cpp -quiet -dumpbase RNG.cc -O -Wall -version -fstrength-reduce -felide-constructors -fsave-memoized -o /usr/tmp/cca19237.s GNU C++ version 2.0 (80386, Sun syntax) compiled by GNU C version 2.0. RNG.cc: In method `RNG::RNG ()': RNG.cc:24: warning: statement with no effect as -i386 -o RNG.o /usr/tmp/cca19237.s Hopefully this is already known about (and not just on 386i's :-). Thanks once again for this software. Jeremy Allison. Disclaimer: Sun don't speak for me - I don't speak for Sun.
Newsgroups: gnu.gdb.bug Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!uk.SUn.COM!Jeremy.Allison From: Jeremy.Alli...@uk.SUn.COM (Jeremy Allison - Sun UK - Tech Support) Subject: gdb4.4 on 386i Message-ID: <9202271243.AA07835@whippet.uk.sun.com> Sender: gnuli...@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 27 Feb 1992 12:43:54 GMT Approved: bug-...@prep.ai.mit.edu Lines: 25 Firstly - thanks to GNU & FSF for producing this software. They make many things possible for those of us with older machines. I have a sun386i at home and am trying to compile up the latest version of gdb - 4.4 for it. There is no configure file for this machine - however, on reading the gcc lists I found the following information given in a patch file to allow gcc2.0 to be installed on a sun386i. + #ifdef NO_STATIC_DEBUG + /* + * now that GDB-4 with Peter Schauer's patches can handle + * shared libs on the sun386, we can skip %{g:-Bstatic} + * by defining NO_STATIC_DEBUG + */ I have mailed the poster direct, but for completeness, does anyone know where these patches (Peter Schauer's) may be found ? If anyone can let me know I'd be very grateful, and will pass the info back to this list if I get an answer. Thanks, Jeremy Allison.