[m-rev.] diff: work around egcs bug for deep profiling

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jun 27 19:04:38 AEST 2001


Estimated hours taken: 0.75

configure.in:
	Disable deep profiling if on x86 and using gcc version egcs-*,
	since egcs-1.1.2 has a bug which causes a gcc internal error
	when trying to install the library in the deep profiling grade.

Workspace: /home/hg/fjh/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.266
diff -u -d -r1.266 configure.in
--- configure.in	2001/06/27 08:46:08	1.266
+++ configure.in	2001/06/27 09:02:35
@@ -1753,6 +1753,17 @@
 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.
 #
@@ -1767,6 +1778,16 @@
 else
     mercury_cv_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_enable_deep_profiler=no ;;
+    esac ;;
+esac
 
 AC_MSG_RESULT($mercury_cv_enable_deep_profiler)
 ENABLE_DEEP_PROFILER=$mercury_cv_enable_deep_profiler

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list