[m-dev.] Re: diff: fix bug with --parallel & C flags

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 18 18:06:21 AEDT 2000


On 18-Sep-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 15-Sep-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > compiler/options.m:
> > > 	Add a new option `--cflags-for-threads', for use by scripts/mmc.in.
> > 
> > Oops, that didn't quite work... when building with the old compiler,
> > this tries to pass a new option which the old compiler doesn't recognize.
> 
> The new workaround still doesn't work if you run the compiler under the
> debugger; you get a hang.

This diff should fix that.

----------

Estimated hours taken: 0.25

scripts/mmc.in:
	When invoking mercury_compile to check whether it supports
	`--cflags-for-threads', make sure that we redirect stdin
	from /dev/null, to ensure that the test doesn't hand if
	debugging is enabled.

Workspace: /home/pgrad/fjh/ws/hg
Index: scripts/mmc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmc.in,v
retrieving revision 1.14
diff -u -d -r1.14 mmc.in
--- scripts/mmc.in	2000/09/14 16:00:01	1.14
+++ scripts/mmc.in	2000/09/18 07:04:08
@@ -35,8 +35,9 @@
 HAVE_BOXED_FLOATS=@HAVE_BOXED_FLOATS@
 DEFAULT_OPT_LEVEL=${MERCURY_DEFAULT_OPT_LEVEL="-O2"}
 
-# XXX Temporary hack for bootstrapping purposes
-case "`$MC --cflags-for-threads 2>&1`" in
+# XXX Temporary hack for bootstrapping purposes:
+# invoke $MC to test if it supports the --cflags-for-threads option.
+case "`$MC --cflags-for-threads </dev/null 2>&1`" in
 	*"unrecognized option"*)
 		# This value will get overridden by
 		# the later setting of --cflags-for-regs, so

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list