mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/dist: more build fixes
Flush stdout before writing to stderr, to avoid reordering output. Allow amd64 from uname -m (FreeBSD). TBR=golang-dev CC=golang-dev https://golang.org/cl/5629051
This commit is contained in:
parent
68576506d6
commit
650e8de0a5
1 changed files with 2 additions and 1 deletions
3
src/cmd/dist/unix.c
vendored
3
src/cmd/dist/unix.c
vendored
|
|
@ -470,6 +470,7 @@ fatal(char *msg, ...)
|
||||||
{
|
{
|
||||||
va_list arg;
|
va_list arg;
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
fprintf(stderr, "go tool dist: ");
|
fprintf(stderr, "go tool dist: ");
|
||||||
va_start(arg, msg);
|
va_start(arg, msg);
|
||||||
vfprintf(stderr, msg, arg);
|
vfprintf(stderr, msg, arg);
|
||||||
|
|
@ -654,7 +655,7 @@ main(int argc, char **argv)
|
||||||
if(gohostarch == nil) {
|
if(gohostarch == nil) {
|
||||||
if(uname(&u) < 0)
|
if(uname(&u) < 0)
|
||||||
fatal("uname: %s", strerror(errno));
|
fatal("uname: %s", strerror(errno));
|
||||||
if(contains(u.machine, "x86_64"))
|
if(contains(u.machine, "x86_64") || contains(u.machine, "amd64"))
|
||||||
gohostarch = "amd64";
|
gohostarch = "amd64";
|
||||||
else if(hassuffix(u.machine, "86"))
|
else if(hassuffix(u.machine, "86"))
|
||||||
gohostarch = "386";
|
gohostarch = "386";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue