cmd/dist: use gohostarch for ssa rewrite check
cmd/dist: use gohostarch for ssa rewrite check

Fix a build failure when bootstrapping the Go compiler with go-bootstrap 1.4
while the environment contains GOARCH=riscv64.

Building Go toolchain1 using go-1.4-bootstrap-20171003.
src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814
invalid operation: y << x (shift count type int64, must be unsigned integer)

This is because:

 - buildtool.go:198: calls bootstrapRewriteFile(src)
 - bootstrapRewriteFile: buildtool.go:283 calls:
 - isUnneededSSARewriteFile: checks os.Getenv("GOARCH")
 - isUnneededSSARewriteFile: returns "", false
 - bootstrapRewriteFile: calls bootstrapFixImports
 - boostrapFixImports: generates code go1.4 cannot compile

Instead of checking "GOARCH" in the environment, use the gohostarch variable.

Change-Id: Ie9c190498555c4068461fead6278a62e924062c6
GitHub-Last-Rev: 300d7a7fea0a67c696970fd271e2ce709674a658
GitHub-Pull-Request: golang/go#52362
Reviewed-on: https://go-review.googlesource.com/c/go/+/400376
Reviewed-by: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Dmitri Shuralyov <d181b7fea0ec87c86ba5a890ab716db52498e3ba@google.com>
Auto-Submit: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Run-TryBot: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Reviewed-by: Joel Sing <4816dabf8db1bc6cac35b3a24cab2ff844b5b0c7@sing.id.au>
Run-TryBot: Joel Sing <4816dabf8db1bc6cac35b3a24cab2ff844b5b0c7@sing.id.au>

nawawi/go,golang/go,nawawi/go,nawawi/go,golang/go,nawawi/go,golang/go,nawawi/go,golang/go,nawawi/go,golang/go,golang/go,nawawi/go,golang/go,golang/go,nawawi/go