🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52308

continuing problems with -fPIC on Solaris2.0

#52308
From: John Cooper
Date: Mon, 30 Nov 1992 17:13
66 lines
2316 bytes
I'm using gcc 2.3.1 on Solaris 2.0

I've applied the following patch (originally from Cygnus) which indeed
prevents the the "Internal compiler error" :

	*** ../clean-gcc-2.3.1/varasm.c	Thu Oct 29 14:29:57 1992
	--- varasm.c	Wed Nov  4 19:35:50 1992
	*************** decode_rtx_const (mode, x, value)
	*** 2166,2171 ****
	--- 2166,2172 ----
	  
	      case SYMBOL_REF:
	      case LABEL_REF:
	+     case PC:
	        value->un.addr.base = x;
	        break;
	  


However, I now have the following problem with some files:

*jsc@kontiki[790]% gcc  -save-temps  -Dsun -D_OL_BUILD -DINCLUDE_ALLOCA_H  -DSV
R4 -DSYSV -Dsun -I../../include -I/usr/openwin/include -c -fPIC -g    -DDYNAMIC
LIB -o Obj-sun4-svr4/shared/Accelerate.o Accelerate.c
/usr/ccs/bin/as: "Accelerate.s", line 2557: error: can't compute difference between symbols in different segments
/usr/ccs/bin/as: "Accelerate.s", line 2558: error: can't compute difference between symbols in different segments


Here's the relevant section of Accelerate.s :
(I've denoted line 2557 with '**')

    .LL110:
    .stabn 68,0,529,.LM171-ActOnAorM
    .LM171:
	    ld [%fp+84],%o1
	    add %o1,-1,%o0
	    mov 4,%o1
	    cmp %o1,%o0
	    blu .LL160
	    nop
	    sll %o0,2,%o0

    1:
	    call 2f
**	    sethi %hi(.LL159-1b),%o1
    2:	or %o1,%lo(.LL159-1b),%o1
	    add %o1,%o7,%o1
	    add %o0,%o1,%o0
	    ld [%o0],%o1
	    jmp %o7+%o1
	    nop
    .section	".rodata"
	    .align 8
	    .align 4
    .LL159:


I know I'm using the SparcWorks assembler, do I have to use the GNU
assembler or can gcc be modified to avoid this?

I can mail the whole assembler file if needed.

Thanks,
--
	--- John
Technical Details
Message-ID: <JSC.92Nov30171318@saxon.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!exodus!jsc

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,27b12726d2c397e3,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-11-30 17:59:53 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!exodus!jsc
From: jsc@saxon.Eng.Sun.COM (John Cooper)
Newsgroups: gnu.gcc.help
Subject: continuing problems with -fPIC on Solaris2.0
Date: 30 Nov 92 17:13:18
Organization: SunSoft, Inc., Mountain View, CA
Lines: 66
Distribution: gnu
Message-ID: <JSC.92Nov30171318@saxon.Eng.Sun.COM>
NNTP-Posting-Host: saxon