diff: port to egcs-1.1 on sparc
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Oct 30 01:10:00 AEDT 1998
I've been doing some work to get Mercury working on taifun using egcs-1.1.
With these changes, it bootchecks, but I'm not sure if it passes all
the tests, or whether it works in grades other than the defaults.
I'll check this in now, and then we can see how the nightly tests go.
--------------------
Port Mercury to egcs-1.1 on sparc-sun-solaris2.6.
configure.in:
When using non-local gotos and egcs on sparc,
include `-fno-function-cse -fno-gcse' in cflags.
scripts/mgnuc.in:
Work-around some gcc internal errors for egcs-1.1 on sparc.
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.138
diff -u -r1.138 configure.in
--- configure.in 1998/10/16 06:16:44 1.138
+++ configure.in 1998/10/29 14:01:05
@@ -1189,6 +1189,20 @@
mercury_cv_asm_labels=no
mercury_cv_gcc_labels=no
;;
+ sparc*)
+ case "`$CC --version`" in
+ egcs*)
+ # I don't know if _both_ of these are needed
+ CFLAGS_FOR_GOTOS="-fno-gcse -fno-function-cse"
+ ;;
+ gcc-2.8*)
+ AC_MSG_WARN(*** Mercury might not work with " \
+ "gcc 2.8 on sparc!)
+ AC_MSG_WARN(We advise using gcc 2.7.x or egcs.)
+ CFLAGS_FOR_GOTOS="-fno-function-cse"
+ ;;
+ esac
+ ;;
esac
AC_SUBST(CFLAGS_FOR_REGS)
AC_SUBST(CFLAGS_FOR_GOTOS)
Index: scripts/mgnuc.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/mgnuc.in,v
retrieving revision 1.55
diff -u -r1.55 mgnuc.in
--- mgnuc.in 1998/10/19 01:23:49 1.55
+++ mgnuc.in 1998/10/29 13:48:13
@@ -354,6 +354,8 @@
# 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.
+# Similarly for egcs-1.1 on sparc with library/lexer.c, library/string.c,
+# and compiler/{deforest,dupelim,mercury_to_mercury,modules}.c.
#
case $COMPILER in gcc)
case "$FULLARCH" in
@@ -384,6 +386,21 @@
*" call_gen.c "*|*" modules.dir/call_gen"*".c "*)
ARCH_OPTS="$ARCH_OPTS -O0" ;;
esac ;;
+ sparc*)
+ case "$*" in
+ *" lexer.c "*|*" modules.dir/lexer"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ *" string.c "*|*" modules.dir/string"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ *" deforest.c "*|*" modules.dir/deforest"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ *" dupelim.c "*|*" modules.dir/dupelim"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ *" mercury_to_mercury.c "*|*" modules.dir/mercury_to_mercury"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ *" modules.c "*|*" modules.dir/modules"*".c "*)
+ ARCH_OPTS="$ARCH_OPTS -O1" ;;
+ esac
esac ;;
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