Commit 7239bf74 by Ian Lance Taylor

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
parent f0515366
7593cc83a03999331c5e2dc65a9306c5fe57dfd0 e66f30e862cb5d02b9d55bf44ac439bb8fc4ea19
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -523,6 +523,11 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package { ...@@ -523,6 +523,11 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package {
return p return p
} }
// We can't check standard packages with gccgo.
if buildContext.Compiler == "gccgo" && p.Standard {
return p
}
// The stack includes p.ImportPath. // The stack includes p.ImportPath.
// If that's the only thing on the stack, we started // If that's the only thing on the stack, we started
// with a name given on the command line, not an // with a name given on the command line, not an
...@@ -1588,7 +1593,7 @@ func computeBuildID(p *Package) { ...@@ -1588,7 +1593,7 @@ func computeBuildID(p *Package) {
// Include the content of runtime/internal/sys/zversion.go in the hash // Include the content of runtime/internal/sys/zversion.go in the hash
// for package runtime. This will give package runtime a // for package runtime. This will give package runtime a
// different build ID in each Go release. // 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")) data, err := ioutil.ReadFile(filepath.Join(p.Dir, "zversion.go"))
if err != nil { if err != nil {
fatalf("go: %s", err) fatalf("go: %s", err)
......
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