Commit 51daa25c authored by Russ Cox's avatar Russ Cox

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 <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent fc768da8
...@@ -1155,7 +1155,7 @@ func cmdbootstrap() { ...@@ -1155,7 +1155,7 @@ func cmdbootstrap() {
goInstall(toolchain...) goInstall(toolchain...)
if debug { if debug {
run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") 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) copyfile(pathf("%s/compile2", tooldir), pathf("%s/compile", tooldir), writeExec)
} }
...@@ -1183,7 +1183,7 @@ func cmdbootstrap() { ...@@ -1183,7 +1183,7 @@ func cmdbootstrap() {
goInstall(append([]string{"-a"}, toolchain...)...) goInstall(append([]string{"-a"}, toolchain...)...)
if debug { if debug {
run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") 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) copyfile(pathf("%s/compile3", tooldir), pathf("%s/compile", tooldir), writeExec)
} }
checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
...@@ -1212,19 +1212,19 @@ func cmdbootstrap() { ...@@ -1212,19 +1212,19 @@ func cmdbootstrap() {
if vflag > 0 { if vflag > 0 {
xprintf("\n") xprintf("\n")
} }
xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
goos = oldgoos goos = oldgoos
goarch = oldgoarch goarch = oldgoarch
os.Setenv("GOOS", goos) os.Setenv("GOOS", goos)
os.Setenv("GOARCH", goarch) os.Setenv("GOARCH", goarch)
os.Setenv("CC", defaultcctarget) os.Setenv("CC", defaultcctarget)
xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
} }
goInstall("std", "cmd") goInstall("std", "cmd")
checkNotStale(goBootstrap, "std", "cmd") checkNotStale(goBootstrap, "std", "cmd")
checkNotStale(cmdGo, "std", "cmd") checkNotStale(cmdGo, "std", "cmd")
if debug { if debug {
run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") 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")...) checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment