🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51432

Re: as error in Gcc version 2.4.2 on Sun SS2

#51432
From: Tilman Spokert
Date: Wed, 02 Jun 1993 16:03
72 lines
3721 bytes
I added more information at the end.

In article <1uif3r$6qm@mail.fwi.uva.nl> casper@fwi.uva.nl (Casper H.S. Dik) writes:
>arthurc@doe.carleton.ca (Arthur Castonguay) writes:
>
>>I'm getting an error from as whenever I try to compile a C++ program
>>using gcc version 2.4.2 (also on version 2.4.0 last Friday).
>
>>The test program is:
>
>>	#include <stream.h>
>
>>	main()
>>	{
>>	  cout << "Hello world\n";
>>	}
>
>I can't reproduce this error (gcc 2.4.2/libg++ 2.3/ SunOS 4.1.2)
>Configured as: ./configure --prefix=/usr/local/gnu sun4
>(But this gives the same config files as --target=sparc-sun-sunos4.1.2)
>>The compiler invocation line is:
>>	 g++ test.cc -o test-cc
>
>>The error returned is:
>
>>	as: "/usr/tmp/cca26475.s", line 8: error: statement syntax
>>	as: "/usr/tmp/cca26475.s", line 14: error: statement syntax
>>	collect: gcc returned 1 exit status
>
>>	Sun Sparc II
>>	SunOS 4.1.2
>>	Configured as:  configure --target=sparc-sun-sunos4.1.2
>>	libg++ version 2.2
>
>The only thing different from our configuration is the libg++ version.
>Other points of interest: which version of as do you use?
Doesn't matter. See below (I used GNU as and SunOS 4.1.3 as)
>
>The code gcc is trying to compile looks like:
>
>	typedef void entry_pt();
>
>	extern entry_pt x1 __asm__ ("__GLOBAL_$I$tie__C3ios");
>
>	entry_pt * __CTOR_LIST__[] = {
>		(entry_pt *) 1,
>		x1,
>		0
>	};
...
I do have the same problem, and the difference is that my entry_pt's are 
declared as follows:

  extern entry_pt x1 __asm__ ("_GLOBAL_$I$tie()");
                                             ^^
It chokes on the paranthesis. This happens for ALL global constructors, from my
program, libg++, etc. etc.

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.4.1/specs
gcc version 2.4.1
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.4.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__GCC_NEW_VARARGS__ -D__sparc__ -D__sun__ -D__unix__ -D__GCC_NEW_VARARGS__ -D__sparc -D__sun -D__unix -D__GCC_NEW_VARARGS__ demo.cc /usr/tmp/cca00368.i
GNU CPP version 2.4.1 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.4.1/cc1plus /usr/tmp/cca00368.i -quiet -dumpbase demo.cc -version -o /usr/tmp/cca00368.s
GNU C++ version 2.4.1 (sparc) compiled by GNU C version 2.4.1.
 /usr/local/sparc-sun-sunos4.1.3/bin/as -o /usr/tmp/cca003681.o /usr/tmp/cca00368.s
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.4.1/ld -e start -dc -dp /lib/crt0.o -L/usr/src/gnu/gcc-2.4.1 -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.4.1 -L/usr/local/lib /usr/tmp/cca003681.o -lg++ -lgcc -lc -lgcc
/usr/tmp/cca00740.s:8: Rest of line ignored. First ignored character is `('.
/usr/tmp/cca00740.s:14: Rest of line ignored. First ignored character is `('.
collect: gcc returned 1 exit status

-- 
Tilman Sporkert  					tilman@netcom.com 
Technical Details
Message-ID: <tilmanC804M8.5M0@netcom.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!uknet!warwick!pipex!bnr.co.uk!bnrgate!nott!torn!utnut!cs.utexas.edu!uwm.edu!spool.mu.edu!olivea!decwrl!decwrl!netcomsv!netcom.com!tilman
References: <ARTHURC.93Jun1110722@keiko.doe.carleton.ca> <1uif3r$6qm@mail.fwi.uva.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,91c8ac48f8305a3d
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-06-02 10:28:13 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!uknet!warwick!pipex!bnr.co.uk!bnrgate!nott!torn!utnut!cs.utexas.edu!uwm.edu!spool.mu.edu!olivea!decwrl!decwrl!netcomsv!netcom.com!tilman
From: tilman@netcom.com (Tilman Spokert)
Subject: Re: as error in Gcc version 2.4.2 on Sun SS2
Message-ID: <tilmanC804M8.5M0@netcom.com>
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <ARTHURC.93Jun1110722@keiko.doe.carleton.ca> <1uif3r$6qm@mail.fwi.uva.nl>
Distribution: gnu
Date: Wed, 2 Jun 1993 16:03:44 GMT
Lines: 72