aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-11-22 21:04:27 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-11-22 21:04:27 +0000
commit7239bf746acb27f8b116e0fbf1b6e40ec12d40d3 (patch)
tree545e7c7a65ae8c006a01b0d464c069a7e70da27e /libgo/go
parentf0515366807f98dadbf322ff605b4331e7c4b5bf (diff)
downloadgcc-7239bf746acb27f8b116e0fbf1b6e40ec12d40d3.zip
gcc-7239bf746acb27f8b116e0fbf1b6e40ec12d40d3.tar.gz
gcc-7239bf746acb27f8b116e0fbf1b6e40ec12d40d3.tar.bz2
re PR go/77910 (go: open zversion.go: no such file or directory)
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 From-SVN: r242724
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/cmd/go/pkg.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgo/go/cmd/go/pkg.go b/libgo/go/cmd/go/pkg.go
index d1292a1..ea223d6 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)