Commit c14d255a authored by Anthony Martin's avatar Anthony Martin

cmd/go: do not print GCC environment variables on Plan 9

R=seed, rminnich, r, minux.ma
CC=golang-dev
https://golang.org/cl/7397059
parent a5e42f26
...@@ -34,12 +34,10 @@ func mkEnv() []envVar { ...@@ -34,12 +34,10 @@ func mkEnv() []envVar {
b.init() b.init()
env := []envVar{ env := []envVar{
{"CC", b.gccCmd(".")[0]},
{"GOARCH", goarch}, {"GOARCH", goarch},
{"GOBIN", gobin}, {"GOBIN", gobin},
{"GOCHAR", archChar}, {"GOCHAR", archChar},
{"GOEXE", exeSuffix}, {"GOEXE", exeSuffix},
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
{"GOHOSTARCH", runtime.GOARCH}, {"GOHOSTARCH", runtime.GOARCH},
{"GOHOSTOS", runtime.GOOS}, {"GOHOSTOS", runtime.GOOS},
{"GOOS", goos}, {"GOOS", goos},
...@@ -48,6 +46,12 @@ func mkEnv() []envVar { ...@@ -48,6 +46,12 @@ func mkEnv() []envVar {
{"GOTOOLDIR", toolDir}, {"GOTOOLDIR", toolDir},
} }
if goos != "plan9" {
cmd := b.gccCmd(".")
env = append(env, envVar{"CC", cmd[0]})
env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
}
if buildContext.CgoEnabled { if buildContext.CgoEnabled {
env = append(env, envVar{"CGO_ENABLED", "1"}) env = append(env, envVar{"CGO_ENABLED", "1"})
} else { } else {
......
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