Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!SAUNA.HUT.FI!jkp From: jkp@SAUNA.HUT.FI (Jyrki Kuoppala) Newsgroups: gnu.utils.bug Subject: alloca() in gas 1.33 Message-ID: <8905172220.AA18644@cs.hut.fi> Date: 17 May 89 22:20:58 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: Helsinki University of Technology, Finland. Lines: 59 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 #include "flonum.h" + #ifdef __GNUC__ + #define alloca __builtin_alloca + #else #ifdef sparc #include + #endif #endif #ifdef USG