diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-11-29 14:17:35 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-11-29 22:18:38 +0000 |
commit | 62e51c536b1ad117a8c8a3819bd8bb984e481f24 (patch) | |
tree | 0f5aaadcea7254c5d6bae9e0817762c97bf331ac | |
parent | 4822e76ba547c158bb98419c6eb514c6ee198ee0 (diff) | |
download | go-62e51c536b1ad117a8c8a3819bd8bb984e481f24.tar.gz go-62e51c536b1ad117a8c8a3819bd8bb984e481f24.zip |
doc: add notes about cgo to go1.8.html
TBR=See https://golang.org/cl/33244
Updates #17929
Change-Id: I0215a7873977be81f2f84374f0b628abaf0e57c1
Reviewed-on: https://go-review.googlesource.com/33667
Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r-- | doc/go1.8.html | 31 | ||||
-rw-r--r-- | doc/go1.8.txt | 7 |
2 files changed, 30 insertions, 8 deletions
diff --git a/doc/go1.8.html b/doc/go1.8.html index 534b287de8..f5851e30e1 100644 --- a/doc/go1.8.html +++ b/doc/go1.8.html @@ -244,7 +244,36 @@ see improvements closer to the 32-bit ARM numbers. <h3 id="cmd_cgo">Cgo</h3> -<p>TODO</p> +<p> <!-- CL 29991 --> +The environment variable <code>PKG_CONFIG</code> may now be used to +set the program to run to handle <code>#cgo pkg-config</code> +directives. The default is <code>pkg-config</code>, the program +always used by earlier releases. This is intended to make it easier +to cross-compile +<a href="/cmd/cgo/">cgo</a> code. +</p> + +<p> <!-- CL 32354 --> +The <a href="/cmd/cgo/">cgo</a> tool now supports a <code>-srcdir</code> +option, which is used by the <a href="/cmd/go/">go</a> command. +</p> + +<p> <!-- CL 31768, 31811 --> +If <a href="/cmd/cgo/">cgo</a> code calls <code>C.malloc</code>, and +<code>malloc</code> returns <code>NULL</code>, the program will now +crash with an out of memory error. +<code>C.malloc</code> will never return <code>nil</code>. +Unlike most C functions, <code>C.malloc</code> may not be used in a +two-result form returning an errno value. +</p> + +<p> <!-- CL 33237 --> +If <a href="/cmd/cgo/">cgo</a> is used to call a C function passing a +pointer to a C union, and if the C union can contain any pointer +values, and if <a href="/cmd/cgo/#hdr-Passing_pointers">cgo pointer +checking</a> is enabled (as it is by default), the union value is now +checked for Go pointers. +</p> <h3 id="gccgo">Gccgo</h3> diff --git a/doc/go1.8.txt b/doc/go1.8.txt index 93aa31c12d..95cc5b60dc 100644 --- a/doc/go1.8.txt +++ b/doc/go1.8.txt @@ -13,12 +13,6 @@ go: can set secure/insecure GIT schemes using GIT_ALLOW_PROTOCOL env var (CL 301 API additions and behavior changes: -cmd/cgo: add #line directives to avoid printing bogus references to Go source files (CL 32613) -cmd/cgo: add -srcdir option (CL 32354) -cmd/cgo: don't ignore qualifiers, don't cast to void* (CL 33097) -cmd/cgo: fix line info in _cgo_gotypes.go (CL 29713) -cmd/cgo: throw if C.malloc returns nil (CL 31768) - cmd/compile, runtime, etc: get rid of constant FP registers (CL 28095) cmd/compile, runtime: add go:yeswritebarrierrec pragma (CL 30938) cmd/compile/internal/gc: add runtime/trace support (CL 25354) @@ -50,7 +44,6 @@ cmd/go: make bug subcommand open the browser (CL 29210) cmd/go: make go test -i -o x.test actually write x.test (CL 31352) cmd/go: print more env variables in "go env" (CL 31330) cmd/go: referee another vendor vs symlink fight (CL 31665) -cmd/go: use cgo -srcdir when using SWIG (CL 32485) cmd/internal/obj, cmd/link: darwin dynlink support (CL 29393) cmd/internal/objfile: add ppc64/ppc64le disassembler support (CL 9682) |