diff options
Diffstat (limited to 'libgo/go/cmd/go/pkg.go')
-rw-r--r-- | libgo/go/cmd/go/pkg.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/go/cmd/go/pkg.go b/libgo/go/cmd/go/pkg.go index 621cb4b6083..ef440dd3b74 100644 --- a/libgo/go/cmd/go/pkg.go +++ b/libgo/go/cmd/go/pkg.go @@ -83,6 +83,7 @@ type Package struct { allgofiles []string // gofiles + IgnoredGoFiles, absolute paths target string // installed file for this package (may be executable) fake bool // synthesized package + external bool // synthesized external test package forceBuild bool // this package must be rebuilt forceLibrary bool // this package is a library (even if named "main") cmdline bool // defined by files listed on command line @@ -112,7 +113,11 @@ func (p *Package) copyBuild(pp *build.Package) { p.ConflictDir = pp.ConflictDir // TODO? Target p.Goroot = pp.Goroot - p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".") + if buildContext.Compiler == "gccgo" { + p.Standard = stdpkg[p.ImportPath] + } else { + p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".") + } p.GoFiles = pp.GoFiles p.CgoFiles = pp.CgoFiles p.IgnoredGoFiles = pp.IgnoredGoFiles @@ -582,7 +587,7 @@ func (p *Package) load(stk *importStack, bp *build.Package, err error) *Package continue } p1 := loadImport(path, p.Dir, stk, p.build.ImportPos[path]) - if !reqPkgSrc && p1.Root == "" { + if !reqStdPkgSrc && p1.Standard { continue } if p1.local { |