If we build several kernel (variants) within the same build directory, bad

things may happen in a parallel build - especially with rules like the
automatic size adjustment for SYMTAB_SPACE, see long standing failure of
evbarm on the build cluster.
Easy fix: .WAIT for each config to complete, before going on with the
next. Low impact, only minor loss of paralellism, and only in cases where
needed.
This commit is contained in:
martin 2012-06-08 08:56:45 +00:00
parent 4df6c44b48
commit fcbf6c86a2
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.43 2012/03/12 03:04:56 dholland Exp $ */
/* $NetBSD: defs.h,v 1.44 2012/06/08 08:56:45 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -481,7 +481,7 @@ struct hashtab *cdevmtab; /* character devm lookup */
TAILQ_HEAD(, devbase) allbases; /* list of all devbase structures */
TAILQ_HEAD(, deva) alldevas; /* list of all devbase attachments */
TAILQ_HEAD(, config) allcf; /* list of configured kernels */
TAILQ_HEAD(conftq, config) allcf; /* list of configured kernels */
TAILQ_HEAD(, devi) alldevi, /* list of all instances */
allpseudo; /* list of all pseudo-devices */
TAILQ_HEAD(, devm) alldevms; /* list of all device-majors */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkmakefile.c,v 1.14 2012/03/11 08:21:53 dholland Exp $ */
/* $NetBSD: mkmakefile.c,v 1.15 2012/06/08 08:56:45 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -512,6 +512,13 @@ emitload(FILE *fp)
fputs(".MAIN: all\nall:", fp);
TAILQ_FOREACH(cf, &allcf, cf_next) {
fprintf(fp, " %s", cf->cf_name);
/*
* If we generate multiple configs inside the same build directory
* with a parallel build, strange things may happen, so sequentialize
* them.
*/
if (cf != TAILQ_LAST(&allcf,conftq))
fprintf(fp, " .WAIT");
}
fputs("\n\n", fp);
TAILQ_FOREACH(cf, &allcf, cf_next) {