Commit 62e51c53 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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/33667Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 4822e76b
......@@ -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>
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment