cmd/go: use portable flags in TestScript/version_build_settings

This fixes a test failure on the 386-longtest builder.

For #37475

Change-Id: Icd1d3474968fcf85ef893190760fb488302abc3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/356209
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
diff --git a/src/cmd/go/testdata/script/version_build_settings.txt b/src/cmd/go/testdata/script/version_build_settings.txt
index 7e93643..1ced285 100644
--- a/src/cmd/go/testdata/script/version_build_settings.txt
+++ b/src/cmd/go/testdata/script/version_build_settings.txt
@@ -8,17 +8,17 @@
 
 # Toolchain flags are added if present.
 # The raw flags are included, with package patterns if specified.
-go build -asmflags=all=-spectre=all
+go build -asmflags=example.com/m=-D=FOO=bar
 go version -m m$GOEXE
-stdout '^\tbuild\tasmflags\tall=-spectre=all$'
+stdout '^\tbuild\tasmflags\texample\.com/m=-D=FOO=bar$'
 
-go build -gcflags=all=-spectre=all
+go build -gcflags=example.com/m=-N
 go version -m m$GOEXE
-stdout '^\tbuild\tgcflags\tall=-spectre=all$'
+stdout '^\tbuild\tgcflags\texample\.com/m=-N$'
 
-go build -ldflags=-w
+go build -ldflags=example.com/m=-w
 go version -m m$GOEXE
-stdout '^\tbuild\tldflags\t-w$'
+stdout '^\tbuild\tldflags\texample\.com/m=-w$'
 
 # gccgoflags are not added when gc is used, and vice versa.
 # TODO: test gccgo.