Module Name:    src
Committed By:   martin
Date:           Fri Jun  8 08:56:45 UTC 2012

Modified Files:
        src/usr.bin/config: defs.h mkmakefile.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.bin/config/defs.h
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/config/mkmakefile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/defs.h
diff -u src/usr.bin/config/defs.h:1.43 src/usr.bin/config/defs.h:1.44
--- src/usr.bin/config/defs.h:1.43	Mon Mar 12 03:04:56 2012
+++ src/usr.bin/config/defs.h	Fri Jun  8 08:56:45 2012
@@ -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 d
 
 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 */

Index: src/usr.bin/config/mkmakefile.c
diff -u src/usr.bin/config/mkmakefile.c:1.14 src/usr.bin/config/mkmakefile.c:1.15
--- src/usr.bin/config/mkmakefile.c:1.14	Sun Mar 11 08:21:53 2012
+++ src/usr.bin/config/mkmakefile.c	Fri Jun  8 08:56:45 2012
@@ -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) {

Reply via email to