jkp@SAUNA.HUT.FI (Jyrki Kuoppala) (05/18/89)
Here's a context diff to make gas use the gcc builtin alloca(). It eliminates the need for -lPW on USG-based machines and avoids using the perhaps buggy version of alloca() on all machines. //Jyrki diff -cr gas-dist/Makefile gas-dist.a/Makefile *** gas-dist/Makefile Fri May 12 21:45:32 1989 --- gas-dist.a/Makefile Thu May 18 00:58:33 1989 *************** *** 88,100 **** # @ln asparc a #lint: lint_sparc CFLAGS = -g -I. $(OPTIONS) LDFLAGS = $(CFLAGS) # To compile gas on a System Five machine, comment out the two lines above # and un-comment out the next three lines # CFLAGS = -g -I. -DUSG $(OPTIONS) # LDFLAGS = $(CFLAGS) ! # LOADLIBES = -lmalloc -lPW a =\ as.o xrealloc.o xmalloc.o hash.o hex-value.o \ --- 88,103 ---- # @ln asparc a #lint: lint_sparc + CC = gcc + CFLAGS = -g -I. $(OPTIONS) LDFLAGS = $(CFLAGS) # To compile gas on a System Five machine, comment out the two lines above # and un-comment out the next three lines + # Add -lPW to LOADLIBES if you compile with cc instead of gcc # CFLAGS = -g -I. -DUSG $(OPTIONS) # LDFLAGS = $(CFLAGS) ! # LOADLIBES = -lmalloc a =\ as.o xrealloc.o xmalloc.o hash.o hex-value.o \ diff -cr gas-dist/atof-generic.c gas-dist.a/atof-generic.c *** gas-dist/atof-generic.c Fri May 12 02:01:56 1989 --- gas-dist.a/atof-generic.c Thu May 18 00:56:45 1989 *************** *** 19,26 **** --- 19,30 ---- #include <ctype.h> #include "flonum.h" + #ifdef __GNUC__ + #define alloca __builtin_alloca + #else #ifdef sparc #include <alloca.h> + #endif #endif #ifdef USG