From: Jaana Burcu Dogan Date: Sat, 18 Feb 2017 23:07:13 +0000 (-0800) Subject: cmd/go/internal/envcmd: report PKG_CONFIG after the CGO group X-Git-Tag: go1.9beta1~1503 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f37428d8b7e06edc4be472695db677f82c9564c5;p=gostls13.git cmd/go/internal/envcmd: report PKG_CONFIG after the CGO group Before the change, `go env` reports PKG_CONFIG in between the CGO env group: GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/jbd" GORACE="" GOROOT="/Users/jbd/go" GOTOOLDIR="/Users/jbd/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lq/qcn67khn4_1b41_g48x3zchh005d21/T/go-build184491598=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" The change makes PKG_CONFIG to be reported as the final item, and not breaking the CGO_* group apart. Change-Id: I1e7ed6bdec83009ff118f85c9f0f7b78a67fdd76 Reviewed-on: https://go-review.googlesource.com/37228 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go index e8c5891724..2f19d65992 100644 --- a/src/cmd/go/internal/envcmd/env.go +++ b/src/cmd/go/internal/envcmd/env.go @@ -94,12 +94,12 @@ func ExtraEnvVars() []cfg.EnvVar { b.Init() cppflags, cflags, cxxflags, fflags, ldflags := b.CFlags(&load.Package{}) return []cfg.EnvVar{ - {Name: "PKG_CONFIG", Value: b.PkgconfigCmd()}, {Name: "CGO_CFLAGS", Value: strings.Join(cflags, " ")}, {Name: "CGO_CPPFLAGS", Value: strings.Join(cppflags, " ")}, {Name: "CGO_CXXFLAGS", Value: strings.Join(cxxflags, " ")}, {Name: "CGO_FFLAGS", Value: strings.Join(fflags, " ")}, {Name: "CGO_LDFLAGS", Value: strings.Join(ldflags, " ")}, + {Name: "PKG_CONFIG", Value: b.PkgconfigCmd()}, } }