[m-dev.] diff: fix parallel make problem in boehm_gc directory
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Feb 12 15:27:00 AEDT 2001
Estimated hours taken: 2
Fix a long-standing problem which caused occaisional failures
when running the nightly tests on hydra, due to problems with
dyn_load.o / gc.a caused by the use of parallel make (-j2)
on hydra.
boehm_gc/Makefile:
Document that this Makefile is not safe for parallel makes
(and why).
boehm_gc/Mmakefile:
Pass `-j1' to make, so that we don't use parallel make.
Workspace: /home/venus/fjh/ws-venus2/mercury
Index: boehm_gc/Makefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Makefile,v
retrieving revision 1.43
diff -u -d -r1.43 Makefile
--- boehm_gc/Makefile 2000/09/21 05:01:04 1.43
+++ boehm_gc/Makefile 2001/02/12 04:18:37
@@ -1,4 +1,13 @@
#-----------------------------------------------------------------------------#
+# WARNING: This makefile is not safe for parallel makes.
+# This makefile should only be invoked with `-j1'.
+#
+# (The reason parallel makes break is because of the use of constructs like
+# `./if_not_there on_sparc_sunos5_so $(MAKE) dyn_load.o)' to handle
+# OS-specific dependencies; this can lead to one process noticing
+# a partially build dyn_load.o and trying to use it before it is
+# completely built.)
+#-----------------------------------------------------------------------------#
# I have modified this file.
# I've added a different rule for the libgc.a target,
# added the `include ../Mmake.common' line,
Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.15
diff -u -d -r1.15 Mmakefile
--- boehm_gc/Mmakefile 2000/09/06 15:25:28 1.15
+++ boehm_gc/Mmakefile 2001/02/12 04:24:46
@@ -32,9 +32,13 @@
# builtin rules) supplied by Mmake to the boehm_gc Makefile, which
# needs the builtin rules.
# We don't use `unset', since the Ultrix /bin/sh doesn't have `unset'.
+#
+# We also need to explicitly pass `-j1' after MMAKEFLAGS,
+# to avoid doing a parallel make, for reasons explained at the
+# top of Makefile.
submake: force
MAKEFLAGS=""; export MAKEFLAGS; \
- $(MAKE) $(BOEHMGC_MAKEFILE) $(MMAKEFLAGS) GRADE=$(GRADE) \
+ $(MAKE) $(BOEHMGC_MAKEFILE) $(MMAKEFLAGS) -j1 GRADE=$(GRADE) \
GC_GRADE=$(GC_GRADE) \
lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB) \
$(EXT_FOR_SHARED_LIB)
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- 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