[m-rev.] diff: delete workarounds for bugs in ancient GCCs
Julien Fischer
jfischer at opturion.com
Tue Jul 7 13:28:00 AEST 2015
Delete workarounds for bugs in ancient GCCs.
configure.ac:
scripts/mgnuc.in:
Delete workarounds for bugs in egcs and GCCs before 2.95.
Julien.
diff --git a/configure.ac b/configure.ac
index 6da3cc2..a12d7ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2607,15 +2607,6 @@ case "$ac_cv_prog_gcc" in yes)
mercury_cv_asm_labels=no
mercury_cv_gcc_labels=no
;;
- sparc*)
- case "`$CC --version < /dev/null`" in
- 2.8*)
- AC_MSG_WARN(
-[Mercury might not work with gcc 2.8 on sparc!
-**** We advise using gcc 2.95.x.])
- ;;
- esac
- ;;
esac
;;
esac
@@ -2908,19 +2899,6 @@ AC_TRY_CPP([
AC_MSG_RESULT($mercury_cv_profiling)
#-----------------------------------------------------------------------------#
-
-AC_MSG_CHECKING(if C compiler is egcs)
-case "`$CC --version < /dev/null 2>&1`" in
- egcs-*)
- mercury_cv_egcs=yes
- ;;
- *)
- mercury_cv_egcs=no
- ;;
-esac
-AC_MSG_RESULT($mercury_cv_egcs)
-
-#-----------------------------------------------------------------------------#
#
# Add an option that disables the deep profiler
#
@@ -2951,20 +2929,6 @@ else
mercury_cv_can_enable_deep_profiler=no
fi
-# On x86, gcc version egcs-1.1.2 has a bug which causes it to get
-# an internal compiler error when compiling library/random.c
-# (when that file was build with mmc --intermodule-optimization -O4)
-# So if we're using an egcs version of gcc, disable deep profiling.
-case "$host" in
- i*86-*-*)
- case "$mercury_cv_egcs" in
- yes)
- mercury_cv_can_enable_deep_profiler=no
- ;;
- esac
- ;;
-esac
-
case "$host" in
*apple*darwin*)
mercury_cv_default_cgi_dir=/Library/WebServer/CGI-Executables
diff --git a/scripts/mgnuc.in b/scripts/mgnuc.in
index aafebcf..ed4e5bf 100644
--- a/scripts/mgnuc.in
+++ b/scripts/mgnuc.in
@@ -533,48 +533,10 @@ case "$FULLARCH" in
;;
esac
-# 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 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.
-# Similarly for gcc-2.7.0 on i386 with compiler/call_gen.c.
-# Similarly for egcs-1.1 on sparc with library/lexer.c, library/string.c,
-# and compiler/{deforest,dupelim,mercury_to_mercury,modules}.c.
-# Similarly for egcs-1.1.2 on i386 with library/table_builtin.c.
-
case $COMPILER in gcc)
case "$FULLARCH" in
- 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;;
- *" bag.c "*)
- case "`$CC --version 2>/dev/null`" in 2.6.*)
- ARCH_OPTS="$ARCH_OPTS -O0" ;;
- esac;;
- esac ;;
- alpha*)
- case "$*" in
- *" modules.c "*|*" modules.dir/modules_"*".c "*)
- case "`$CC --version 2>/dev/null`" in 2.6.*)
- ARCH_OPTS="$ARCH_OPTS -O1" ;;
- esac
- esac ;;
i*86*)
case "$*" in
- *" call_gen.c "*|*" modules.dir/call_gen"*".c "*)
- ARCH_OPTS="$ARCH_OPTS -O0" ;;
- *" table_builtin.c "*|*" modules.dir/table_builtin"*".c "*)
- ARCH_OPTS="$ARCH_OPTS -O0" ;;
- *" random.c "*|*" random.dir/random"*".c "*)
- ARCH_OPTS="$ARCH_OPTS -O0" ;;
# Workarounds for internal problems with GCC in asm_fast.gc
# on i*86. Reported against gcc 4.4.5 and 4.6.0.
*" ml_backend.ml_closure_gen.c "*)
@@ -593,23 +555,6 @@ case $COMPILER in gcc)
esac
;;
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" ;;
- *" dl.c "*|*" modules.dir/dl"*".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
More information about the reviews
mailing list