diff: boehm_gc/Makefile: fix for race condition
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 3 20:41:22 AEDT 1998
boehm_gc/Makefile:
Fix a race condition caused by the use of the same dummy file
as a flag in two different rules. This race condition caused
the Makefile to occaisionally fail when using parallel make.
One rule could unset the flag (i.e. remove the `on_sparc_sunos_5'
file) in the time between when the other rule set the flag and
when it checked the flag. The fix was just to use a different
file name for the flag in the other rule.
cvs diff boehm_gc/Makefile
Index: boehm_gc/Makefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- Makefile 1997/12/10 06:29:32 1.34
+++ Makefile 1998/02/03 09:35:30
@@ -257,14 +257,14 @@
# shared library version of the collector
libgc$(PROF).so: $(OBJS) if_mach if_not_there # dyn_load_sunos53.o
- rm -f on_sparc_sunos5
- ./if_mach SPARC SUNOS5 touch on_sparc_sunos5
+ rm -f on_sparc_sunos5_so
+ ./if_mach SPARC SUNOS5 touch on_sparc_sunos5_so
./if_mach SPARC SUNOS5 $(MAKE) dyn_load_sunos53.o
./if_mach SPARC SUNOS5 \
$(LINK_SHARED_OBJ) -o libgc$(PROF).so $(OBJS) dyn_load_sunos53.o \
-ldl
- ./if_not_there on_sparc_sunos5 $(MAKE) dyn_load.o
- ./if_not_there on_sparc_sunos5 \
+ ./if_not_there on_sparc_sunos5_so $(MAKE) dyn_load.o
+ ./if_not_there on_sparc_sunos5_so \
$(LINK_SHARED_OBJ) -o libgc$(PROF).so $(OBJS) dyn_load.o -lc
mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s $(srcdir)/mips_ultrix_mach_dep.s $(srcdir)/rs6000_mach_dep.s $(UTILS)
--
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