This is the mail archive of the gcc@gcc.gnu.org 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]

patch to fix OpenServer coring on index()


OpenServer (and presumably OpenDesktop and friends before it) 
provides an alloca() in libPW.a.   GCC has been using that alloca 
for a long time.   Now, as a result of autoconf getting 
increasingly ambitious, autoconf finds that we have index().
Unfortunately, it finds index() in libPW which predates any 
useful defintion (like "use strchr").    Since libPW is on the
way out, I just rewired the build to use the provided alloca
instead of the one in libPW.   I have successfully done a clean
bootstrap on the compiler with this change.

Please commit this patch.

Thanx,
RJL


Thu Dec 18 00:19:38 1997  Robert Lipe <robertl@dgii.com>

	* x-sco5 (CLIB) Deleted.  (ALLOCA) Added.
	* xm-sco5.h  (USE_C_ALLOCA) Added.



--- gcc/config/i386/x-sco5_	Wed Dec 17 13:37:15 1997
+++ gcc/config/i386/x-sco5	Wed Dec 17 14:59:57 1997
@@ -3,7 +3,8 @@
 CC = cc 
 OLDCC = cc
 CCLIBFLAGS =
-CLIB = -lPW
+# We avoid the ALLOCA in -lPW becuase it gives us an evil index()
+ALLOCA = alloca.o
 
 # See all the declarations.
 FIXPROTO_DEFINES = -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
--- gcc/config/i386/xm-sco5.h__	Wed Dec 17 13:45:28 1997
+++ gcc/config/i386/xm-sco5.h	Wed Dec 17 15:00:06 1997
@@ -10,3 +10,9 @@
 #define sys_siglist _sys_siglist
 #undef SYS_SIGLIST_DECLARED
 #define SYS_SIGLIST_DECLARED
+
+/* If not compiled with GNU C, use the portable alloca.  */
+#ifndef __GNUC__
+#define USE_C_ALLOCA
+#endif
+


-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com


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