This is the mail archive of the gcc@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]

The parallel make bug in gcc and gcc/cp


Hi,

There is a parallel make bug in gcc and gcc/cp. The problem is

EXTRA_PASSES =
GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES)
...
LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
...
LANG_LIB2FUNCS= cplib2.txt
...
libgcc2.a: ... $(LIB2ADD) ...
	....
	for f in cplib2.txt
	do
		$(MAKE) $f
	done
...
cplib2.txt: $(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) cplib2.ready
...
cplib2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs

The functions in cplib2.txt are in C++. But there is no dependency
on cc1plus for cplib2.txt. For most machines, it is ok even if you
use parallel make since when you get cplib2.txt in libgcc2.a, cc1plus
has been built. But if you have a fast machine, with parallel build,
you may get there before cc1plus is done. You will run

	make .... foo.o

while cc1plus is still being built. Since foo.o depends on cc1plus,
make will try to build cc1plus. 2 cc1plus builds will run into each
other. It seems C++ may not be only parallel build problem. But it is
the first one I ran into build error. Should I try to fix it and
send in a patch?

Thanks for your time.


-- 
H.J. Lu (hjl@gnu.org)


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