Commit 0c2b980c authored by Shenghou Ma's avatar Shenghou Ma

cmd/ld: don't show cursym in gcc invocation failure message

before:
fmt.statictmp_0731:/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100
now:
/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100

R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/8827045
parent 591d4a47
...@@ -687,6 +687,7 @@ hostlink(void) ...@@ -687,6 +687,7 @@ hostlink(void)
argv[argc++] = p; argv[argc++] = p;
w = create(p, 1, 0775); w = create(p, 1, 0775);
if(w < 0) { if(w < 0) {
cursym = S;
diag("cannot create %s: %r", p); diag("cannot create %s: %r", p);
errorexit(); errorexit();
} }
...@@ -698,6 +699,7 @@ hostlink(void) ...@@ -698,6 +699,7 @@ hostlink(void)
len -= n; len -= n;
} }
if(close(w) < 0) { if(close(w) < 0) {
cursym = S;
diag("cannot write %s: %r", p); diag("cannot write %s: %r", p);
errorexit(); errorexit();
} }
...@@ -730,6 +732,7 @@ hostlink(void) ...@@ -730,6 +732,7 @@ hostlink(void)
} }
if(runcmd(argv) < 0) { if(runcmd(argv) < 0) {
cursym = S;
diag("%s: running %s failed: %r", argv0, argv[0]); diag("%s: running %s failed: %r", argv0, argv[0]);
errorexit(); errorexit();
} }
......
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