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
diff --git a/doc/progs/run b/doc/progs/run
index 48725d3..da777f3 100755
--- a/doc/progs/run
+++ b/doc/progs/run
@@ -45,6 +45,10 @@
 if [ "$goos" == "netbsd" ]; then
 	c_go_cgo=""
 fi
+# cgo3 and cgo4 don't run on openbsd, since cgo cannot handle stdout correctly
+if [ "$goos" == "openbsd" ]; then
+	c_go_cgo="cgo1 cgo2"
+fi
 
 timeout="
 	timeout1