diff: work-around for string_test failure on kryten

Fergus Henderson fjh at cs.mu.oz.au
Fri Jan 9 15:56:53 AEDT 1998


tests/Mmake.common:
	Add support for setting `MLFLAGS-foo' to alter the `MLFLAGS'
	used for compiling `foo'.

tests/general/Mmakefile:
	Set `MLFLAGS-string_test' to `--no-strip', to work around a bug
	(probably in the Solaris linker) that shows up when this test
	is run on kryten with options `-O1 --opt-space' in grade `none'.

cvs diff tests/Mmake.common tests/general/Mmakefile
Index: tests/Mmake.common
===================================================================
RCS file: /home/mercury1/repository/tests/Mmake.common,v
retrieving revision 1.9
diff -u -r1.9 Mmake.common
--- 1.9	1997/11/22 17:13:52
+++ Mmake.common	1998/01/09 04:49:03
@@ -3,6 +3,7 @@
 GRADEFLAGS = --grade $(GRADE) $(GRADEFLAGS-$*) $(EXTRA_GRADEFLAGS)
 MCFLAGS = $(MCFLAGS-$*) $(EXTRA_MCFLAGS)
 MGNUCFLAGS=-g $(EXTRA_MGNUCFLAGS) $(EXTRA_CFLAGS)
+MLFLAGS = $(MLFLAGS-$@) $(EXTRA_MLFLAGS)
 
 # override this with `mmake HAVE_NUPROLOG=yes'
 # if you want to rebuild the `.exp' files.
Index: tests/general/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/general/Mmakefile,v
retrieving revision 1.1
diff -u -r1.1 Mmakefile
--- 1.1	1997/09/29 18:04:14
+++ Mmakefile	1998/01/09 04:55:38
@@ -62,6 +62,17 @@
 # mode_inf_bug needs to be compiled with `--infer-all'.
 MCFLAGS-mode_inf_bug = --infer-all
 
+# In grade `none' with options `-O1 --opt-space' on kryten
+# (a sparc-sun-solaris2.5 system), string_test needs to be linked
+# with `--no-strip', otherwise it gets a seg fault. 
+# This is probably a bug in one of the underlying tools (e.g. the Solaris
+# linker) rather than a bug in Mercury, and since it is goes away when you
+# compile with debugging information, it is very difficult to debug.
+# It is much easier to just work around it this way rather than
+# tracking it down.
+MLFLAGS-string_test = --no-strip
+
+
 DEPENDS=$(PROGS:%=%.depend)
 OUTS=	$(PROGS:%=%.out)
 EXPS=	$(PROGS:%=%.exp)

-- 
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