svn commit: r263778 - in head: bin lib lib/clang sbin share/mk usr.bin usr.sbin
ian at FreeBSD.org
Mon Apr 21 13:15:44 UTC 2014
On Thu, 2014-03-27 at 20:44 +0100, Dimitry Andric wrote:
> On 27 Mar 2014, at 19:12, Jilles Tjoelker <jilles at stack.nl> wrote:
> > On Thu, Mar 27, 2014 at 11:05:00AM -0600, Warner Losh wrote:
> >> On Mar 26, 2014, at 4:30 PM, Dimitry Andric <dim at freebsd.org> wrote:
> >>> Author: dim
> >>> Date: Wed Mar 26 22:30:38 2014
> >>> New Revision: 263778
> >>> URL: http://svnweb.freebsd.org/changeset/base/263778
> >>> Log:
> >>> Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
> >>> all the SUBDIR entries in parallel, instead of serially. Apply this
> >>> option to a selected number of Makefiles, which can greatly speed up the
> >>> build on multi-core machines, when using make -j.
> >>> This can be extended to more Makefiles later on, whenever they are
> >>> verified to work correctly with parallel building.
> >> Why not have this ‘opt out’ rather than ‘opt in’ like it is now? Are
> >> there any known bad dependencies this introduces?
> > I'm paranoid about build systems ;) It is easy to add dependencies
> > across directories and as long as directories are built in sequence,
> > nothing goes wrong.
> > In fact, I had enabled SUBDIR_PARALLEL in sys/modules/Makefile as well,
> > but this caused mysterious failures with some kernels such as mips
> > ADM5120.
> There are a bunch of other parts that don't really like parallel builds
> at the moment. For example, gnu/usr.bin/binutils needs its libraries
> (libbfd.a, etc) built first, before it can link the programs. Similar
> for gnu/usr.bin/cc, which needs libiberty, libcpp, etc before being able
> to build the rest of gcc.
> Most of these cases can hopefully be solved by adding .WAIT targets at
> strategic points in the SUBDIR lists, but this also needs a bit of extra
> logic in bsd.subdir.mk.
It turns out I needed the .WAIT functionality to use SUBDIR_PARALLEL for
$work, so I came up with the attached, does this look okay to commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2074 bytes
Desc: not available
More information about the svn-src-head