🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #54244

Compiling gcc on a sparc runnig 4.1

#54244
From: Pierre Laplante
Date: Thu, 20 Dec 1990 15:02
123 lines
3954 bytes
I am triyng to compile gcc on on a sparc running 4.1 and when
I compile a program with the result and run the compiled program,
I got a segmentation fault. Here is what I do:

> config.gcc sun4-os4
> make
> make stage1
> make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"
> make install

and after that I compile any program and when I run it, it crash.
Here is my Makefile:

# This file makes TeX in its various incarnations.
#

SITEDIR=..
CC=cc
OPT=-O
CFLAGS=$(OPT) -I$(SITEDIR)
LDFLAGS=$(OPT)
SHELL=/bin/sh

objs=tex0.o tex1.o tex2.o tex3.o tex4.o tex5.o tex6.o tex7.o tex8.o tex9.o
iobjs=iextra.o initex.o $(objs)
vobjs=extra.o itex.o $(objs)

makeargs=SITEDIR="$(SITEDIR)" CC="$(CC)" OPT="$(OPT)" LDFLAGS="$(LDFLAGS)"

.SUFFIXES:
.SUFFIXES: .o .c
.c.o:
		$(CC) $(CFLAGS) -c $*.c


default:	all

all:		initex virtex
triptrap:	triptex

initex:		stamp-convert $(iobjs)
		$(CC) $(LDFLAGS) -o initex $(iobjs)

virtex:		stamp-convert $(vobjs)
		$(CC) $(LDFLAGS) -o virtex $(vobjs)

run-triptrap:
		-ln TeXtrip/trip.tex .
		../texware/pltotf TeXtrip/trip.pl trip.tfm
		-triptex < TeXtrip/trip1.in
		-diff TeXtrip/tripin.log trip.log
		-triptex < TeXtrip/trip2.in > trip.fot
		-diff TeXtrip/trip.log trip.log
		-diff TeXtrip/trip.fot trip.fot
		../texware/dvitype trip.dvi < TeXtrip/dvitype.in
		-diff TeXtrip/trip.typ dvitype.out

# The `ini_to_trip' script changes texd.h, instead of the change file, so
# retangling is not necessary.  After changing constants, making a
# triptex means making an initex.
# 
triptex:	stamp-trip
		make $(makeargs) initex
		mv initex triptex

stamp-trip:	stamp-convert
		rm -f *.o
		$(SHELL) ./ini_to_trip texd.h
		touch stamp-trip

# tangle produces tex.p and tex.pool.
# 
tex.p:		tex.web ctex.ch
		../web/tangle tex.web ctex.ch

# The convert script produces tex[0-9].c, itex.c, coerce.h, and texd.h.
# The (hand-coded) memory.h is included in one of tex?.c files; it isn't
# really necessary to `convert' again if it changes, only to recompile
# that file, but describing that relationship is ugly to do.
# (Furthermore, memory.h is stable.)
# 
stamp-convert:	tex.p memory.h fixcoerce.h tex.defines
		$(SHELL) ./convert
		touch stamp-convert

# The (hand-coded) file extra.c and the (generated) file itex.c have
# #ifdefs on INITEX, so we have to compile them with -DINITEX for initex
# and triptex.
# 
iextra.o:	extra.c texd.h
		$(CC) $(CFLAGS) -DINITEX -c extra.c && mv extra.o iextra.o

initex.o:       itex.c
		$(CC) $(CFLAGS) -DINITEX -c itex.c && mv itex.o initex.o

$(objs):	stamp-convert tex.h   # included by texd.h.
extra.o:	texd.h
tex0.o:		tex0.c
tex1.o:		tex1.c
tex2.o:		tex2.c
tex3.o:		tex3.c
tex4.o:		tex4.c
tex5.o:		tex5.c
tex6.o:		tex6.c
tex7.o:		tex7.c
tex8.o:		tex8.c
tex9.o:		tex9.c

clean:
		rm -f stamp-* *.o triptex initex virtex
		rm -f texd.h coerce.h *.log
		rm -f 8terminal.tex trip.* tripos.tex dvitype.out

veryclean:	clean
		rm -f tex?.c itex.c tex.p tex.pool *.fmt texput.*
		rm -f \#*\# *~ *.bak *.ckp core




Pierre Laplante	 				
Universite de Montreal, D.I.R.O. X-220, C.P. 6128, succursale A
Montreal (Qc) H3C 3J7, (514) 343-6111 3530, laplante@iro.umontreal.ca 
Technical Details
Message-ID: <1990Dec20.150227.17033@IRO.UMontreal.CA>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!clyde.concordia.ca!IRO.UMontreal.CA!megantic.IRO.UMontreal.CA!laplante

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,df3f52e5d8a2588b,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1990-12-20 07:02:27 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!clyde.concordia.ca!IRO.UMontreal.CA!megantic.IRO.UMontreal.CA!laplante
From: laplante@IRO.UMontreal.CA (Pierre Laplante)
Newsgroups: gnu.gcc.help
Subject: Compiling gcc on a sparc runnig 4.1
Message-ID: <1990Dec20.150227.17033@IRO.UMontreal.CA>
Date: 20 Dec 90 15:02:27 GMT
Sender: news@IRO.UMontreal.CA
Reply-To: laplante@IRO.UMontreal.CA (Pierre Laplante)
Organization: Universite de Montreal
Lines: 123