]> Cypherpunks repositories - gostls13.git/commit
runtime/cgo: only build _cgo_callers if x_cgo_callers is defined
authorIan Lance Taylor <iant@golang.org>
Fri, 1 Apr 2016 15:33:25 +0000 (08:33 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 1 Apr 2016 16:13:45 +0000 (16:13 +0000)
commit58394fd7d56ff233a5e32aa3001ec8ad5988e8f3
treee85c6baa5e035dd2ea74e5a66b9ed8f7990d7d42
parent633ab7426a906b72dcf6f1d54e87f4ae926dc4e1
runtime/cgo: only build _cgo_callers if x_cgo_callers is defined

Fixes a problem when using the external linker on Solaris.  The Solaris
external linker still doesn't work due to issue #14957.

The problem is, for example, with `go test cmd/objdump`:

        objdump_test.go:71: go build fmthello.go: exit status 2
                # command-line-arguments
                /var/gcc/iant/go/pkg/tool/solaris_amd64/link: running gcc failed: exit status 1
                Undefined                       first referenced
                 symbol                             in file
                x_cgo_callers                       /tmp/go-link-355600608/go.o
                ld: fatal: symbol referencing errors
                collect2: error: ld returned 1 exit status

Change-Id: I54917cfd5c288ee77ea25c439489bd2c9124fe73
Reviewed-on: https://go-review.googlesource.com/21392
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/runtime/cgo/callbacks.go
src/runtime/cgo/callbacks_traceback.go [new file with mode: 0644]