From 51daa25c6c3441dc9e5a10f65896f553e3f7a862 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 31 Oct 2017 09:59:29 -0400 Subject: [PATCH] cmd/dist: avoid darwin_amd64 assumption in debug prints Noted in CL 73212 review by crawshaw. Neglected to update CL 73212 before submitting. Also fix printing of target goos/goarch for cross-compile build. Change-Id: If702f23071a4456810f1de6abb9115b38933c5c1 Reviewed-on: https://go-review.googlesource.com/74631 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: David Crawshaw --- src/cmd/dist/build.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index 7334fca7fd..0a397a18af 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -1155,7 +1155,7 @@ func cmdbootstrap() { goInstall(toolchain...) if debug { run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") - run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/../../darwin_amd64/runtime/internal/sys.a", tooldir)) + run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) copyfile(pathf("%s/compile2", tooldir), pathf("%s/compile", tooldir), writeExec) } @@ -1183,7 +1183,7 @@ func cmdbootstrap() { goInstall(append([]string{"-a"}, toolchain...)...) if debug { run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") - run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/../../darwin_amd64/runtime/internal/sys.a", tooldir)) + run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) copyfile(pathf("%s/compile3", tooldir), pathf("%s/compile", tooldir), writeExec) } checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) @@ -1212,19 +1212,19 @@ func cmdbootstrap() { if vflag > 0 { xprintf("\n") } - xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch) goos = oldgoos goarch = oldgoarch os.Setenv("GOOS", goos) os.Setenv("GOARCH", goarch) os.Setenv("CC", defaultcctarget) + xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch) } goInstall("std", "cmd") checkNotStale(goBootstrap, "std", "cmd") checkNotStale(cmdGo, "std", "cmd") if debug { run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") - run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/../../darwin_amd64/runtime/internal/sys.a", tooldir)) + run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) } -- 2.48.1