[gnu.g++.bug] Sun3OS4 problems.... 1.36.1

zjat02@apctrc.trc.amoco.com (Jon A. Tankersley) (11/20/89)

There is mention to use GAS if it is available, but no explicit instructions
as to how.....  It appears that "make AS=a68" isn't sufficient, the sources
don't use a68 in the assembly step.  Do I need to define my own .s.o: line
in the Makefile?  When I changed PIPE-AS to -S and then ran the make twice
(to make the .s and then the .o with the AS=a68) things kinda worked, but I'd
rather not have to do that for ALL makefiles :-( or explain it to my users :-(

I haven't had time to RTFM, takes a while to wade through the texinfo's.  There
appears to be nothing explicit in the README/INSTALL, etc. that describes this
stuff.

Related problem  -pipe doesn't work.  Pipe closes, and as has no input....

Also, it was stated in the hints or somewhere that Sun as and GAS are the only
ones that don't need -DFASCIST_ASSEMBLER defined.  I get errors in builtin,
stream, BitString, String, Rational, and EH with the Sun as.  All around the
DTOR/CTOR stabs.

Any ideas?   Do I have to change something to make gcc/g++ use a68 and gnuld?
Add .cc.o to my make.include?
-tank-
#include <std/disclaimer.h>		/* nobody knows the trouble I .... */
tank@apctrc.trc.amoco.com    ..!uunet!apctrc!tank

schmidt@glacier.ics.uci.edu (Doug Schmidt) (11/21/89)

In article <1191@apctrc.UUCP>, zjat02@apctrc (Jon A. Tankersley) writes:
>There is mention to use GAS if it is available, but no explicit instructions
>as to how.....  

This is a good question.

>Any ideas?   Do I have to change something to make gcc/g++ use a68 and gnuld?

I think the easiest way to do this is as follows:

1. let's assume the appropriate part of your g++ Makefile looks like this:

----------------------------------------
prefix = /usr/gnu

# Directory where sources are, from where we are.
srcdir = .
# Directory in which to put the executable for the command `g++'
bindir = $(prefix)/bin
# Directory in which to put the subprograms used by the compiler.
libdir = $(prefix)/lib
# Directory in which to put the crt0+.o, crt1+.o, and other such files.
startdir = $(prefix)/lib
----------------------------------------

2. By default g++ will look for cc1plus in /usr/gnu/lib as the executable file
gcc-cc1plus.  What I've been doing is simply adding GNU as and GNU ld
in this same directory, as gcc-ld and gcc-as.  Here's what
/usr/gnu/lib looks like on my system (a Sun 4/260):

----------------------------------------
% ls /usr/gnu/lib
./              crt1+.o         gcc-cc1*        gcc-gpc1*       info/
../             flex.skel       gcc-cc1plus*    gcc-gpclib*     libg++.a*
bison.hairy     g++-include/    gcc-cpp*        gcc-include/
bison.simple    gcc-as*         gcc-gnulib*     gcc-ld*
----------------------------------------

When /usr/gnu/g++ looks for the assembler and linker it will choose
/usr/gnu/lib/gcc-ld and /usr/gnu/lib/gcc-as over /bin/ld and /bin/as
by default.

This method seems to work fairly well, though note that gcc will also
start using gas and GNU ld also (unless you take explicit steps to
avoid this).

Hope this helps,

  Doug
--
schmidt@ics.uci.edu (ARPA) |   Per me si va nella citta' dolente.
office: (714) 856-4043     |   Per me si va nell'eterno dolore.
                           |   Per me si va tra la perduta gente.
                           |   Lasciate ogni speranza o voi ch'entrate.