]> Cypherpunks repositories - gostls13.git/commitdiff
cgo: add more information about gcc output parsing failures
authorRuss Cox <rsc@golang.org>
Thu, 12 Nov 2009 00:58:27 +0000 (16:58 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 12 Nov 2009 00:58:27 +0000 (16:58 -0800)
R=r
https://golang.org/cl/152084

src/cmd/cgo/gcc.go

index 6e9ba13b764dabbc3ee0c13893c2440d1d147940..d6b5c6bc85434f9908f2352c6403cb5ae5417537 100644 (file)
@@ -96,6 +96,10 @@ func (p *Prog) loadDebugInfo() {
                }
        }
 
+       if nerrors > 0 {
+               fatal("failed to interpret gcc output:\n%s", stderr)
+       }
+
        // Extract the types from the DWARF section of an object
        // from a well-formed C program.  Gcc only generates DWARF info
        // for symbols in the object file, so it is not enough to print the