diff: a fix for interactive queries on Linux

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 29 20:54:27 AEST 1999


Estimated hours taken: 0.25

scripts/ml.in:
	For Linux with ELF, if `--trace' is enabled, then
	pass `-rdynamic' to gcc.   This is needed to make symbols
	exported for use in code linked in with dlopen(),
	which is used for interactive queries in the
	Mercury debugger.

Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.55
diff -u -r1.55 ml.in
--- ml.in	1999/03/25 14:45:39	1.55
+++ ml.in	1999/03/29 10:51:01
@@ -460,8 +460,10 @@
 	;;
 esac
 
-# On Irix 5, grades `fast' and `jump' only work in non_shared mode.
 case $FULLARCH in
+    #
+    # On Irix 5, grades `fast' and `jump' only work in non_shared mode.
+    #
     *-sgi-irix5*)
 	case $non_local_gotos in
 	    true)
@@ -470,6 +472,21 @@
 		LIBRARY_PATH="$NONSHARED_PATH:$LIBRARY_PATH"
 		export LIBRARY_PATH
 		;;
+	esac
+	;;
+    #
+    # On Linux ELF, `-rdynamic' is needed to make symbols
+    # exported for use in code linked in with dlopen(),
+    # which is used for interactive queries in the
+    # Mercury debugger.
+    #
+    *-linux*aout*)
+	# Linux a.out -- no special options needed
+	;;
+    *-linux*)
+	# Linux ELF -- need to add `-rdynamic' if using the debugger
+	case $trace in true)
+		ARCH_OPTS=-rdynamic
 	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