Subject: Re: USE_NEW_TOOLCHAIN toolchain build not parallel-safe
To: Havard Eidnes <he@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 10/01/2001 16:40:09
On Thu, 27 Sep 2001, Havard Eidnes wrote:

: Not only that -- the normal toolchain build is also busted in the same
: way (no big surprise there, I guess).  I tried to do a "make -j2" of
: the tree recently -- my tree was updated Sep 23.
:
: The first time my build blew up was with
:
: --- dependall-gcc ---
: In file included from /usr/src/gnu/usr.bin/gcc/cc1/../../../dist/toolchain/gcc/c-iterate.c:34:
: /usr/src/gnu/usr.bin/gcc/cc1/../../../dist/toolchain/gcc/expr.h:353: insn-codes.h: No such file or directory
: /usr/tools/bin/mkdep: compile failed.
: *** Error code 1
: 1 error
:
: The reason appears to be that "backend" needs to be built before "cc1"
: can be descended into, i.e. a missing .WAIT between those two in

.WAIT is, IMNSHO, just plain silly.  However, since this seems to be the
preferred method to do parallelism, I'll add the necessary goop to
<bsd.subdir.mk> to make this work Right[*].  I will also fix the other
reported problems with parallelism....

[*] Before the parallelism overhaul, subdir Makefiles would contain rules
    like "all-foo: all-bar all-baz" to express the dependencies of programs,
    so that a *single* program could be built from a clean tree by building
    its dependencies first.  What I didn't know, when creating the new trees
    for the toolchain, was that this practice has become *completely broken*
    thanks to the "dependall" target being used directly for recursion.

    The Right way to fix this is to have dependency directives that will
    work for both "all" and "dependall";  barring that, we could create
    these dependencies on the fly, using the .WAIT directives as marks for
    such dependencies.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/