]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: don't show cursym in gcc invocation failure message
authorShenghou Ma <minux.ma@gmail.com>
Fri, 19 Apr 2013 18:44:16 +0000 (02:44 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Fri, 19 Apr 2013 18:44:16 +0000 (02:44 +0800)
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

src/cmd/ld/lib.c

index 47339d4e53a3518857144cf602efa1beb2770a86..6b95ae2aeab7ce511a60a42b4a14e1d2579d9308 100644 (file)
@@ -687,6 +687,7 @@ hostlink(void)
                argv[argc++] = p;
                w = create(p, 1, 0775);
                if(w < 0) {
+                       cursym = S;
                        diag("cannot create %s: %r", p);
                        errorexit();
                }
@@ -698,6 +699,7 @@ hostlink(void)
                        len -= n;
                }
                if(close(w) < 0) {
+                       cursym = S;
                        diag("cannot write %s: %r", p);
                        errorexit();
                }
@@ -730,6 +732,7 @@ hostlink(void)
        }
 
        if(runcmd(argv) < 0) {
+               cursym = S;
                diag("%s: running %s failed: %r", argv0, argv[0]);
                errorexit();
        }