This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SMP parallel build problem


I put my SMP parallel build log at

http://ftp.valinux.com/pub/support/hjl/bugs/gcc/smp/build.log

The problem is the rule for .o files in $(CXX_LIB2FUNCS). They all
depend on intl.all, which depend on all those generated files like
$(srcdir)/objc/objc-parse.c. The problem is the parallel build on SMP
machine will start multiple-build of those generated files at the
same time. As the result, they run into each other.

I am enclosing my kludge here. It may not be 100% correct.


-- 
H.J. Lu (hjl@gnu.org)
---
2000-08-24  H.J. Lu  (hjl@gnu.org)

	* Make-lang.in (cplib2.txt): Depend on intl.all.

Index: gcc/cp/Make-lang.in
===================================================================
RCS file: /work/cvs/gnu/egcs/gcc/cp/Make-lang.in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Make-lang.in
--- gcc/cp/Make-lang.in	2000/08/07 01:34:36	1.1.1.1
+++ gcc/cp/Make-lang.in	2000/08/24 19:55:17
@@ -191,7 +191,11 @@ dyn-string.o: $(srcdir)/../libiberty/dyn
 	 -c $(srcdir)/../libiberty/dyn-string.c -o dyn-string.o
 
 # We want to update cplib2.txt if any of the source files change...
-cplib2.txt: $(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS)
+# FIXME: We put intl.all so that those $(INTL_TARGETS) depends will
+# get built before we start compiling each one in $(CXX_LIB2FUNCS).
+# Otherwise, the parallel build on SMP machine will start multiple-
+# build of the same dependencies of $(INTL_TARGETS) at the same time.
+cplib2.txt: $(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) intl.all
 	case " $(LANGUAGES) " in \
 	*" "[cC]"++ "*) \
 	  echo $(CXX_LIB2FUNCS) > cplib2.new;; \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]