Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config If we build several kernel (variants) within ...



details:   https://anonhg.NetBSD.org/src/rev/65e9bef01238
branches:  trunk
changeset: 779649:65e9bef01238
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jun 08 08:56:45 2012 +0000

description:
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.

diffstat:

 usr.bin/config/defs.h       |  4 ++--
 usr.bin/config/mkmakefile.c |  9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 7d068dd326b3 -r 65e9bef01238 usr.bin/config/defs.h
--- a/usr.bin/config/defs.h     Fri Jun 08 07:54:14 2012 +0000
+++ b/usr.bin/config/defs.h     Fri Jun 08 08:56:45 2012 +0000
@@ -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 @@
 
 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 */
diff -r 7d068dd326b3 -r 65e9bef01238 usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c       Fri Jun 08 07:54:14 2012 +0000
+++ b/usr.bin/config/mkmakefile.c       Fri Jun 08 08:56:45 2012 +0000
@@ -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 @@
        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) {



Home | Main Index | Thread Index | Old Index