diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-22 21:04:27 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-22 21:04:27 +0000 |
commit | e78175cb4caf64554cdc66a545e57c543781c706 (patch) | |
tree | 545e7c7a65ae8c006a01b0d464c069a7e70da27e /libgo/go/cmd/go | |
parent | 9e8fe65543be7148ef8687123c735b72a333445c (diff) | |
download | gcc-e78175cb4caf64554cdc66a545e57c543781c706.tar.gz |
PR go/77910
cmd/go: don't check standard packages when using gccgo
This copies https://golang.org/cl/33295 to libgo.
This fixes GCC PR 77910.
Reviewed-on: https://go-review.googlesource.com/33471
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242724 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/cmd/go')
-rw-r--r-- | libgo/go/cmd/go/pkg.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgo/go/cmd/go/pkg.go b/libgo/go/cmd/go/pkg.go index d1292a132d2..ea223d6203d 100644 --- a/libgo/go/cmd/go/pkg.go +++ b/libgo/go/cmd/go/pkg.go @@ -523,6 +523,11 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package { return p } + // We can't check standard packages with gccgo. + if buildContext.Compiler == "gccgo" && p.Standard { + return p + } + // The stack includes p.ImportPath. // If that's the only thing on the stack, we started // with a name given on the command line, not an @@ -1588,7 +1593,7 @@ func computeBuildID(p *Package) { // Include the content of runtime/internal/sys/zversion.go in the hash // for package runtime. This will give package runtime a // different build ID in each Go release. - if p.Standard && p.ImportPath == "runtime/internal/sys" { + if p.Standard && p.ImportPath == "runtime/internal/sys" && buildContext.Compiler != "gccgo" { data, err := ioutil.ReadFile(filepath.Join(p.Dir, "zversion.go")) if err != nil { fatalf("go: %s", err) |