From 119917375bd0ecbc4f5631e0e35958a578bebd8c Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 8 Feb 2012 16:26:00 -0500 Subject: [PATCH] cmd/dist: redure max background tasks nr. when building on ARM R=rsc CC=golang-dev https://golang.org/cl/5642063 --- src/cmd/dist/unix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmd/dist/unix.c b/src/cmd/dist/unix.c index e687142e90..632ebbcdba 100644 --- a/src/cmd/dist/unix.c +++ b/src/cmd/dist/unix.c @@ -147,6 +147,7 @@ static struct { char *cmd; } bg[MAXBG]; static int nbg; +static int maxnbg = nelem(bg); static void bgwait1(void); @@ -158,7 +159,7 @@ genrun(Buf *b, char *dir, int mode, Vec *argv, int wait) Buf cmd; char *q; - while(nbg >= nelem(bg)) + while(nbg >= maxnbg) bgwait1(); // Generate a copy of the command to show in a log. @@ -665,6 +666,9 @@ main(int argc, char **argv) fatal("unknown architecture: %s", u.machine); } + if(strcmp(gohostarch, "arm") == 0) + maxnbg = 1; + init(); xmain(argc, argv); bfree(&b);