~james-page/ubuntu/utopic/gccgo-go/cgo-support

« back to all changes in this revision

Viewing changes to debian/patches/gccgo-stdlib-ignore.patch

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-15 22:18:45 UTC
  • Revision ID: package-import@ubuntu.com-20140215221845-2velwqcfmswpkv5v
Tags: 1.2-0ubuntu5
* d/postinst: Drop priority of go alternative to ensure that golang-go
  has priority on supported architectures. 
* d/p/cmdgo.patch,d/rules: Use dpkg build flags during compilation
  (LP: #1279624).
* d/p/issue61970044_40001.diff: Cherry pick fix to avoid having to use
  the -work flag when compiling go using gccgo (LP: #1279157).
* d/p/gccgo-stdlib-ignore.patch: Add additional checks for stdlib paths
  under gccgo to allow use of go test -i (LP: #1279157).

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
+}
163
163
--- a/src/cmd/go/test.go
164
164
+++ b/src/cmd/go/test.go
165
 
@@ -532,6 +532,9 @@ func (b *builder) test(p *Package) (buil
 
165
@@ -369,6 +369,9 @@ func runTest(cmd *Command, args []string
 
166
                all := []string{}
 
167
                for path := range deps {
 
168
                        if !build.IsLocalImport(path) {
 
169
+                               if _, ok := stdlib[path]; ok && buildContext.Compiler == "gccgo" {
 
170
+                                       continue
 
171
+                               }
 
172
                                all = append(all, path)
 
173
                        }
 
174
                }
 
175
@@ -532,6 +535,9 @@ func (b *builder) test(p *Package) (buil
166
176
        var stk importStack
167
177
        stk.push(p.ImportPath + "_test")
168
178
        for _, path := range p.TestImports {
172
182
                p1 := loadImport(path, p.Dir, &stk, p.build.TestImportPos[path])
173
183
                if p1.Error != nil {
174
184
                        return nil, nil, nil, p1.Error
175
 
@@ -539,6 +542,9 @@ func (b *builder) test(p *Package) (buil
 
185
@@ -539,6 +545,9 @@ func (b *builder) test(p *Package) (buil
176
186
                imports = append(imports, p1)
177
187
        }
178
188
        for _, path := range p.XTestImports {
182
192
                if path == p.ImportPath {
183
193
                        continue
184
194
                }
185
 
@@ -663,13 +669,15 @@ func (b *builder) test(p *Package) (buil
 
195
@@ -663,13 +672,15 @@ func (b *builder) test(p *Package) (buil
186
196
 
187
197
        // The generated main also imports testing and regexp.
188
198
        stk.push("testmain")