[gnu.g++.bug] Trouble with g++ 1.36 on Sun3

booga@POLYSLO.CALPOLY.EDU (Steve Jankowski [shroud]) (01/03/90)

I have two problems and one question.  Hopefully, the problem
is some dumb mistake I've made during configuration...
Please respond via e-mail.

prob 1:  I have installed gcc 1.36 on our Sun 3's (SunOS 4.0.3) but
have been unable to get g++ 1.36.1 working.  I am using the GNU
linker and assembler (a run with -v has verified that they
are actually being used).  gcc is working with the GNU linker,
but is using Sun's assembler.  The problem is that g++ seems to be
generating some bogus instructions.  Given the source:

main( int argc, char *argv[])
{
  printf( "can we at least generate an executable?\n");
  printf( "guess so... \n");
}

g++ generates....

#NO_APP
gcc_compiled.:
.text
LC0:
	.ascii "can we at least generate an executable?\12\0"
LC1:
	.ascii "guess so... \12\0"
	.even
.globl _main
_main:
	link a6,#0
	jbsr ___main		; these two are bogus
	movel d0,d0		; 
	pea LC0
	jbsr _printf
	pea LC1
	jbsr _printf
	addqw #8,sp
	clrl d0
	jra L1
L1:
	unlk a6
	rts

The linker then complains about ___main being unresolved.
I've restored g++ 1.35 and it does not produce the two bogus instructions.

prob 2:   With the same configuration as above, I'm also seeing lots
of unresolved reference complaints from the linker.  When compiling
a program that uses the CursesWindow class, it can't find waddstr,
initscr, etc..  Compiling other C++ programs have similar problems.
g++ 1.35 does not have this problem.  Add an extern def to the
above code and the linker bitches about not being able to
resolve printf.

extern int printf( const char *  ...);

main( int argc, char *argv[])
{
  printf( "can we at least generate an executable?\n");
  printf( "guess so... \n");
}

Questions:
	We have numerous architectures here that my employers
(faculty) would like to use g++ on.  This includes Pyramids,
Sequents, and AIX on PS/2's and a 370 type machine.  I've
gotten gcc up on our Pyramid, but had no luck with g++.
What is the status of g++ for these machines (esp. Pyramid
and AIX-PS/2-370)???

Please respond via email.
thanks


Steve Jankowski		booga@polyslo.calpoly.edu   pyramid!polyslo!booga
Cal Poly, San Luis Obispo, Computer Science
Systems Administrator