Subject: Re: Shared libraries re-enabled for VAX
To: Johnny Billquist <bqt@softjar.se>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-vax
Date: 04/08/2007 10:39:39
On Sun, 8 Apr 2007, Johnny Billquist wrote:

> So let's go back to the other problems we have.
>
> 1) Running gcc natively don't work. The result is:
> Gnat:bqt/src> gcc -o hello hello.c
> /var/tmp//ccT5yaE4.s: Assembler messages:
> /var/tmp//ccT5yaE4.s:12: Warning: Symbol used as immediate operand in PIC 
> mode.
> /var/tmp//ccT5yaE4.s:13: Fatal error: Junk at end of expression "LC0"
>
> This from a simple hello world program. Anyone should be able to reproduce 
> this.

   I had already found this, and pointed it out to Matt.

   Specifying -fno-pic gets rid of the warning message (not suprisingly).

   The fatal error seems to be that parsing the "pushab .LC0" seems to stop 
after the ".", leaving the LC0 as leftover junk.  I changed the hello.s 
file to use "LC0" instead of ".LC0" and it assembled.  However, trying to 
link the .o file (with cc -static -fno-pic) fails:

hello.o: In function `main':
hello.c:(.text+0x4): undefined reference to `$4'
hello.c:(.text+0x11): undefined reference to `$1'
hello.c:(.text+0x16): undefined reference to `uts'
vlc$ nm hello.o
          U $1
          U $4
          U .
00000000 r LC0
00000000 T main
          U uts

   One other thing:  the default optimization appears to be -O0; 
specifying -O1 or greater still results in:

hello.c: In function 'main':
hello.c:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.NetBSD.org/Misc/send-pr.html> for instructions.


--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA