🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #425

Re: G++ V2.1 PROBLEMS?

#425
From: Mike Stump
Date: Wed, 15 Apr 1992 21:52
92 lines
2529 bytes
You need to use gas.

> From: Ian Macpherson <ian@case.co.uk>
> Message-Id: <9204140915.AA01055@trillian.case.uucp>
> Subject: G++ V2.1 PROBLEMS?
> To: bug-gcc@prep.ai.mit.edu
> Date: Tue, 14 Apr 92 10:15:28 BST
> Cc: nc@uknet.ac.uk (Nigel Canning)

> 	Hello,

> 	We've just got gcc-2.1. I've installed it on a number of sun4
> 	machines and used it to successfully build programs such as libg++
> 	and groff.

> 	However, on a sun3 (a SUN 3/50) the C++ compiler has problems
> 	building groff and libg++. The SUN assembler objects to the .stabs
> 	directive generated by the compiler. The details of the system
> 	are:

> 	Host:			SUN 3/50
> 	OS:			SUNOS 4.1
> 	Host compiler:		GCC 1.40
> 	Host assembler:		Sun as
> 	Configuration:		sun3-sunos4.1 --nfp
> 				Linked `config.h' to `./config/xm-m68k.h'
> 				Linked `tm.h' to `./config/sun3n.h'
> 				Linked `md' to `./config/m68k.md'
> 				Linked `aux-output.c' to `./config/m68k.c'
> 				Linked `tconfig.h' to `./config/xm-m68k.h'

> 	As an example, here is the assembler output and errors from
> 	compiling the groff 1.05 c++test.c program:

> ====================== C++ source =============================
> #include <stdio.h>

> struct A {
>   A() { fputs("A\n", stdout); }
>   ~A() { fputs("~A\n", stdout); }
> };

> A a;

> main()
> {
>   return 0;
> }
> ====================== assembler code & errors ================
> 	#NO_APP
> 	gcc2_compiled.:
> 	.text
> 	LC0:
> 		.ascii "A\12\0"
> 	LC1:
> 		.ascii "~A\12\0"
> 	.globl _a
> 	.data
> 		.even
> 	_a:
> 		.skip 1
> 	.text
> 		.even
> 	.globl _main
> 	_main:
> 		link a6,#0
> 		jbsr ___main
> 		clrl d0
> 		unlk a6
> 		rts
> 		.even
> 	.globl __GLOBAL_$D$a
> 	__GLOBAL_$D$a:
> 		link a6,#0
> 		pea __iob+20
> 		pea LC1
> 		jbsr _fputs
> 		unlk a6
> 		rts
> 	.stabs "___DTOR_LIST__",22,0,0,__GLOBAL_$D$a
> as: error (c++test.s:31): Invalid operand
> 		.even
> 	.globl __GLOBAL_$I$a
> 	__GLOBAL_$I$a:
> 		link a6,#0
> 		pea __iob+20
> 		pea LC0
> 		jbsr _fputs
> 		unlk a6
> 		rts
> 	.stabs "___CTOR_LIST__",22,0,0,__GLOBAL_$I$a
> as: error (c++test.s:41): Invalid operand
Technical Details
Message-ID: <9204152152.AA27870@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Subject: Re:  G++ V2.1 PROBLEMS?
Message-ID: <9204152152.AA27870@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 15 Apr 1992 21:52:48 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 93