]> Cypherpunks repositories - gostls13.git/commit
cgo: enable cgo on openbsd
authorJoel Sing <jsing@google.com>
Thu, 20 Dec 2012 14:43:19 +0000 (01:43 +1100)
committerJoel Sing <jsing@google.com>
Thu, 20 Dec 2012 14:43:19 +0000 (01:43 +1100)
commit708db79011010549827fb18c800489a20a04b47c
treedab67cfcdef725f8ed0e169d313cdd2c94575a16
parente6ca125f14d0f677205d3247f26da60ab8069b9c
cgo: enable cgo on openbsd

Enable cgo on OpenBSD.

The OpenBSD ld.so(1) does not currently support PT_TLS sections. Work
around this by fixing up the TCB that has been provided by librthread
and reallocating a TCB with additional space for TLS. Also provide a
wrapper for pthread_create, allowing zeroed TLS to be allocated for
threads created externally to Go.

Joint work with Shenghou Ma (minux).

Requires change 6846064.

Fixes #3205.

R=golang-dev, minux.ma, iant, rsc, iant
CC=golang-dev
https://golang.org/cl/6853059
doc/progs/run
misc/cgo/test/basic.go
src/pkg/go/build/build.go
src/pkg/net/cgo_openbsd.go [new file with mode: 0644]
src/pkg/net/cgo_unix.go
src/pkg/os/user/lookup_unix.go
src/pkg/runtime/cgo/gcc_openbsd_386.c [new file with mode: 0644]
src/pkg/runtime/cgo/gcc_openbsd_amd64.c [new file with mode: 0644]
src/pkg/runtime/cgo/openbsd.c [new file with mode: 0644]