This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gnu-regex.o can't find alloca + patch

The recent alloca tweeking caused fixinc/gnu-regex.o to mishandle
alloca when using cc on solaris2 (and probably any non-gcc compiler.)

 > cc -DIN_GCC -g -I. -I.. -I../../../egcs-CVS20010306/gcc/fixinc
 >   -I../../../egcs-CVS20010306/gcc/fixinc/..
 >   -I../../../egcs-CVS20010306/gcc/fixinc/../config
 >   --I../../../egcs-CVS20010306/gcc/fixinc/../../include -o fixincl
 >   -fixincl.o fixtests.o fixfixes.o server.o procopen.o gnu-regex.o
 >   -fixlib.o ../../libiberty/libiberty.a
 > ild: (undefined symbol) alloca -- referenced in the text segment of gnu-regex.o
 > make[3]: *** [full-stamp] Error 5

This patch seems to fix it.  Ok to install?

2001-03-06  Kaveh R. Ghazi  <>

	* fixinc/ (FIXINC_DEFS): Add -DHAVE_CONFIG_H.

	* fixinc/gnu-regex.c: Don't include auto-host.h since we get
	config.h now.  Include libiberty.h to handle alloca.

diff -rup orig/egcs-CVS20010306/gcc/fixinc/ egcs-CVS20010306/gcc/fixinc/
--- orig/egcs-CVS20010306/gcc/fixinc/	Wed Dec 27 10:40:02 2000
+++ egcs-CVS20010306/gcc/fixinc/	Tue Mar  6 10:27:46 2001
@@ -23,7 +23,7 @@
 # Its purpose is to build the any-platforms script.
 # Directory where sources are, from where we are.
 srcdir = @srcdir@
diff -rup orig/egcs-CVS20010306/gcc/fixinc/gnu-regex.c egcs-CVS20010306/gcc/fixinc/gnu-regex.c
--- orig/egcs-CVS20010306/gcc/fixinc/gnu-regex.c	Thu Dec 14 14:58:39 2000
+++ egcs-CVS20010306/gcc/fixinc/gnu-regex.c	Tue Mar  6 11:04:05 2001
@@ -22,16 +22,17 @@
    along with this program; if not, write to the Free Software Foundation, 
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-#include "auto-host.h"
-/* GCC LOCAL: we don't need NLS here.  */
-#undef ENABLE_NLS
 #undef	_GNU_SOURCE
 #define _GNU_SOURCE
 # include <config.h>
+/* GCC LOCAL: we don't need NLS here.  */
+#undef ENABLE_NLS
+/* GCC LOCAL: to handle defining alloca.  */
+#include "libiberty.h"
 /* Do not use a C alloca, we will leak memory and crash.  */
 #ifdef C_ALLOCA

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]