src/cmd/cgo/util.go | 4 ++-- diff --git a/src/cmd/cgo/util.go b/src/cmd/cgo/util.go index 921306b7aabf653c5d60c04aaee505c8d86bb75d..779f7be2259b3750166b6edce318adb779e7a3a6 100644 --- a/src/cmd/cgo/util.go +++ b/src/cmd/cgo/util.go @@ -63,7 +63,7 @@ // Disable escape codes in clang error messages. p.Env = append(os.Environ(), "TERM=dumb") err := p.Run() if _, ok := err.(*exec.ExitError); err != nil && !ok { - fatalf("%s", err) + fatalf("exec %s: %s", argv[0], err) } ok = p.ProcessState.Success() stdout, stderr = bout.Bytes(), berr.Bytes() @@ -88,7 +88,7 @@ func fatalf(msg string, args ...interface{}) { // If we've already printed other errors, they might have // caused the fatal condition. Assume they're enough. if nerrors == 0 { - fmt.Fprintf(os.Stderr, msg+"\n", args...) + fmt.Fprintf(os.Stderr, "cgo: "+msg+"\n", args...) } os.Exit(2) }