🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2093

GAS, GLD, GCC and G++

#2093
From: David C Lawrence
Date: Fri, 15 Dec 1989 06:03
135 lines
9007 bytes
I have a feeling this isn't a bug related to Sun4 SunOS 4.0, but just
to me.  (Sigh.)  This relates to GCC 1.36, G++ 1.36.1 and libG++ 1.36.0.

Several places in various installation documentation for GCC and G++
say to use GAS and GLD if you have them.  Well, I do.  Now how do I
tell the compilers to use them?  The documentation never says.  This
is what I see on output of gcc -v test.c -o test:

gcc version 1.36
 /usr/local/gnu/lib/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ test.c /usr/tmp/cca02592.cpp
GNU CPP version 1.36
 /usr/local/gnu/lib/gcc-cc1 /usr/tmp/cca02592.cpp -quiet -dumpbase test.c -version -o /usr/tmp/cca02592.s
GNU C version 1.36 (sparc) compiled by GNU C version 1.36.
default target switches: -mfpu -mepilogue
 as -o test.o /usr/tmp/cca02592.s
 /usr/local/gnu/lib/gcc-ld -o test -e start -dc -dp /lib/crt0.o test.o /usr/local/gnu/lib/gcc-gnulib -lc

"as" just sits out there all alone.  I don't see anything in the
Makefile to change, or in the couple of config files (even the ones
that have "gas.h" in their name) that I checked.  I looked at the
strings in gcc.c and don't see, within the past forty-five minutes of
trying to figure this out, how come /usr/local/gnu/lib/gcc- is getting
prepended to cpp, cc1 and ld, but not to as.  I don't really want it
prepended to as, anyway, because I want it to use /usr/local/gnu/bin/gas.
gnu ld from binutils is also in /usr/local/gnu/bin.

Help?

I've been looking at doing this for GCC right now in anticipation of
doing it for G++.  I built g++ but when I went to libg++ to make
src/libg++.a it died right away on the very first file, builtin.cc,
complaining that -fchar-charconst was an unrecognised flag.  When I
removed that flag from the src/Makefile (which bore the ominous
comment "# the fchar-charconst flag is mandatory for some stream ops
to work sensibly") it died for something else which I don't remember
right now.  Hang on ...

$ make src/libg++.a
(cd src; make GXX="g++"  GXXFLAGS=" -I/src/gnu/libg++/g++-include -g -O -fstrength-reduce  -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized   -pipe" GXXLDFLAGS="-L/src/gnu/libg++/src -lg++ -lm " LIBDIR="/usr/local/gnu/lib" SRCIDIR="/src/gnu/libg++/g++-include" CC="gcc" CFLAGS=" -I/usr/local/gnu/lib/gcc-include -I/usr/include -I/src/gnu/libg++/g++-include -g -O -fstrength-reduce -fdelayed-branch   -pipe" RANLIB="ranlib" LDXX="ld" GXXCRT1="/usr/local/gnu/lib/crt1+.o" MAKE="make" prefix=


"/usr/local/gnu" )
g++ -I/src/gnu/libg++/g++-include -g -O -fstrength-reduce  -felide-constructors
-fschedule-insns -fdelayed-branch -fsave-memoized   -pipe -I.. -c  builtin.cc
In file included from /src/gnu/libg++/g++-include/sys/time.h:3, from builtin.cc:
316:
/src/gnu/libg++/g++-include/time.h:60: warning: type declaration of timezone shadows previous declaration
/src/gnu/libg++/g++-include/time.h:60: warning: `timezone' was declared `extern' and later `static'
g++ -I/src/gnu/libg++/g++-include -g -O -fstrength-reduce  -felide-constructors
-fschedule-insns -fdelayed-branch -fsave-memoized   -pipe -I.. -c  File.cc
g++ -I/src/gnu/libg++/g++-include -g -O -fstrength-reduce  -felide-constructors
-fschedule-insns -fdelayed-branch -fsave-memoized   -pipe -I.. -c  stream.cc
stream.cc:28: argument list for `ostream' does not match any in class
stream.cc: In method ostream::ostream (const char *, enum io_mode, enum access_mode):
stream.cc:31: base class initializer specified, but no base class to initialize
stream.cc: In method ostream::ostream (const char *, const char *):
stream.cc:34: base class initializer specified, but no base class to initialize
stream.cc: In method ostream::ostream (int, enum io_mode (=  1 )):
stream.cc:37: base class initializer specified, but no base class to initialize
stream.cc: In method ostream::ostream (struct _iobuf *):
stream.cc:40: base class initializer specified, but no base class to initialize
stream.cc: In method ostream::ostream (int, char *):
stream.cc:43: base class initializer specified, but no base class to initialize
stream.cc: At top level:
stream.cc:48: argument list for `istream' does not match any in class
stream.cc:53: argument list for `istream' does not match any in class
stream.cc: In method istream::istream (const char *, enum io_mode, enum access_mode):
stream.cc:53: base class initializer specified, but no base class to initialize
stream.cc: At top level:
stream.cc:59: argument list for `istream' does not match any in class
stream.cc: In method istream::istream (const char *, const char *):
stream.cc:59: base class initializer specified, but no base class to initialize
stream.cc: At top level:
stream.cc:65: argument list for `istream' does not match any in class
stream.cc: In method istream::istream (int, enum io_mode (=  0 )):
stream.cc:65: base class initializer specified, but no base class to initialize
stream.cc: At top level:
stream.cc:71: argument list for `istream' does not match any in class
stream.cc: In method istream::istream (struct _iobuf *):
stream.cc:71: base class initializer specified, but no base class to initialize
stream.cc: At top level:
stream.cc:77: argument list for `istream' does not match any in class
stream.cc: In method istream::istream (int, char *):
stream.cc:77: base class initializer specified, but no base class to initialize
stream.cc: In method class ostream *istream::tie (class ostream *):
stream.cc:86: redefinition of `class ostream *istream::tie (class ostream *)'
/src/gnu/libg++/g++-include/stream.h:445: here is the previous declaration of `class ostream *istream::tie (class ostream *)'
stream.cc: At top level:
stream.cc:103: no `scan' member function declared in class
stream.cc: In method class istream &istream::scan (const char *, ...):
stream.cc:109: `stat' undeclared (first use this function)
stream.cc:109: (Each undeclared identifier is reported only once
stream.cc:109: for each function it appears in.)
stream.cc:109: `fp' undeclared (first use this function)
stream.cc: In method class istream &istream::operator >> (short int &):
stream.cc:118: warning: implicit declaration of function `scan'
stream.cc:118: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (unsigned short int &):
stream.cc:123: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (int &):
stream.cc:128: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (unsigned int &):
stream.cc:133: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (long int &):
stream.cc:138: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (long unsigned int &):
stream.cc:143: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (float &):
stream.cc:148: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (double &):
stream.cc:153: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class istream &istream::operator >> (char *):
stream.cc:158: ambiguous type conversion requested for constructor `istream'
stream.cc: In method class ostream &ostream::form (const char *, ...):
stream.cc:168: `stat' undeclared (first use this function)
stream.cc:168: `fp' undeclared (first use this function)
stream.cc: In function void eatwhite (class istream &):
stream.cc:216: redefinition of `void eatwhite (class istream &)'
/src/gnu/libg++/g++-include/stream.h:460: here is the previous declaration of `void eatwhite (class istream &)'
make[1]: *** [stream.o] Error 1
make: *** [src/libg++.a] Error 1

I know precious little about the C++ language at this point, but I'd
like to get g++ working for our users on the sparcs, Sun3s, Balance
8000 and 21000, and DECstations.   I know it can work on the Suns; the
Balances worry me. :-/

One last thing: there is a comment in HINTS where Michael says he will
fix the old problem I had with -nfp- configurations, where the
LINK_SPEC was mixed up.  Shouldn't this comment be removed now, just
to keep the extra information to a minimum?

Dave
-- 
   (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))
Technical Details
Message-ID: <8912150603.AA03018@turing.cs.rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!TURING.CS.RPI.EDU!tale

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!TURING.CS.RPI.EDU!tale
From: tale@TURING.CS.RPI.EDU (David C Lawrence)
Newsgroups: gnu.g++.bug
Subject: GAS, GLD, GCC and G++
Message-ID: <8912150603.AA03018@turing.cs.rpi.edu>
Date: 15 Dec 89 06:03:26 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 132