[comp.sys.att] diffs to get gcc-1.22 running on un

aglew@urbsdc.Urbana.Gould.COM (06/21/88)

>Note the kernel has a bug in it (what AT&T produce something buggy,
>never ;-) so if for some reason the make blows up (usally you see
>assembly code spit out on the screen) just type `make' again, or
>`make CC=stage1/gcc CFLAGS="-O -Bstage1/"' if it blows up on making
>itself (it rarely blows up on making itself though.)
>                                  Have fun.
>                                  -bob

Good, I'm glad that somebody else noticed this bug.
Has anyone any idea of where it comes from? It has caused
me to almost completely lose faith in my 3B1 (since compiling
compilers is just about the only thing I do on it)

rrr@naucse.UUCP (Bob Rose ) (06/22/88)

In article <31200025@urbsdc>, aglew@urbsdc.Urbana.Gould.COM writes:
> 
> >Note the kernel has a bug in it (what AT&T produce something buggy,
> >never ;-) so if for some reason the make blows up (usally you see
> >assembly code spit out on the screen) just type `make' again, or
> >`make CC=stage1/gcc CFLAGS="-O -Bstage1/"' if it blows up on making
> >itself (it rarely blows up on making itself though.)
> >                                  Have fun.
> >                                  -bob
> 
> Good, I'm glad that somebody else noticed this bug.
> Has anyone any idea of where it comes from? It has caused
> me to almost completely lose faith in my 3B1 (since compiling
> compilers is just about the only thing I do on it)

I have found the fix to this bug. Type in `ksh.' Yes, I know you
are already probably running ksh, but run ksh on top of ksh, then
the bug goes away. Is this stupid or what. I notice that I also
have to do this if I run `compressdir' on a large tree. If I type
compressdir and am not in a `sub-ksh' it (as in ksh) core dumps.
But if I am in a `sub-ksh' compressdir works fine.

P.S. Don't you just love it when assembly code poors out on the screen
and you ain't even doing anything with the assembler or compiler!!!

P.S-2 a posted the diffs to get up gcc and forgot `alloca.s.' Here
it is (I've been getting all sorts of mail for it. Don't you just
hate tem' jecks that post sources or diffs to the net and forget
a file :-( Sorry :^)

--------------cut here------------------
	file	"alloca.s"
	global	alloca
alloca:
	mov.l	(%sp)+,%a1	# pop return addr from top of stack
	mov.l	(%sp)+,%d0	# pop size in bytes from top of stack
	add.l	&R%1,%d0	# round size up to long word
	and.l	&-4,%d0		# mask out lower two bits of size
	sub.l	%d0,%sp		# allocate by moving stack pointer
	tst.b	P%1(%sp)	# stack probe to allocate pages
	mov.l	%sp,%a0		# return pointer as pointer
	mov.l	%sp,%d0		# return pointer as int to avoid disaster
	add.l	&-4,%sp		# new top of stack
	jmp	(%a1)		# not a normal return
	set	S%1,64		# safety factor for C compiler scratch
	set	R%1,3+S%1	# add to size for rounding
	set	P%1,-132	# probe this far below current top of stack
--------------cut here------------------