cvs diff: work-around for gcc 2.6.3 bug on mips

fjh at cs.mu.OZ.AU fjh at cs.mu.OZ.AU
Sun Apr 20 12:13:54 AEST 1997


Work-around a bug in gcc 2.6.3 on mips that caused a gcc internal error
when compiling compiler/bytecode.c.

scripts/mgnuc.in:
	Ensure that bytecode.c is compiled with `-O1' rather than `-O2'.

Index: mgnuc.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/mgnuc.in,v
retrieving revision 1.39
diff -u -r1.39 mgnuc.in
--- 1.39	1997/02/07 14:17:32
+++ mgnuc.in	1997/04/20 02:09:34
@@ -265,8 +265,8 @@
 
 #
 # Kludge for gcc-2.6.3 bug on mips: if you use gcc global registers and -O2,
-# gcc 2.6.3 gets an internal error compiling library/int.c.
-# As a work-around, we compile that file with -O1.
+# gcc 2.6.3 gets an internal error compiling library/int.c and
+# compiler/bytecode.c.  As a work-around, we compile those file with -O1.
 # Similarly library/bag.c needs to be compiled with -O0.
 # Similarly for gcc-2.6.3 on alpha with compiler/modules.c.
 #
@@ -275,6 +275,10 @@
 		mips*)
 			case "$*" in
 			*" int.c "*|*" int.dir/int_"*".c "*)
+				case "`$CC --version 2>/dev/null`" in 2.6.*)
+					ARCH_OPTS="$ARCH_OPTS -O1" ;;
+				esac;;
+			*" bytecode.c "*|*" bytecode.dir/bytecode_"*".c "*)
 				case "`$CC --version 2>/dev/null`" in 2.6.*)
 					ARCH_OPTS="$ARCH_OPTS -O1" ;;
 				esac;;

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list