@@ -244,7 +244,36 @@ <h3 id="compiler">Compiler Toolchain</h3>
244
244
245
245
< h3 id ="cmd_cgo "> Cgo</ h3 >
246
246
247
- < p > TODO</ p >
247
+ < p > <!-- CL 29991 -->
248
+ The environment variable < code > PKG_CONFIG</ code > may now be used to
249
+ set the program to run to handle < code > #cgo pkg-config</ code >
250
+ directives. The default is < code > pkg-config</ code > , the program
251
+ always used by earlier releases. This is intended to make it easier
252
+ to cross-compile
253
+ < a href ="/cmd/cgo/ "> cgo</ a > code.
254
+ </ p >
255
+
256
+ < p > <!-- CL 32354 -->
257
+ The < a href ="/cmd/cgo/ "> cgo</ a > tool now supports a < code > -srcdir</ code >
258
+ option, which is used by the < a href ="/cmd/go/ "> go</ a > command.
259
+ </ p >
260
+
261
+ < p > <!-- CL 31768, 31811 -->
262
+ If < a href ="/cmd/cgo/ "> cgo</ a > code calls < code > C.malloc</ code > , and
263
+ < code > malloc</ code > returns < code > NULL</ code > , the program will now
264
+ crash with an out of memory error.
265
+ < code > C.malloc</ code > will never return < code > nil</ code > .
266
+ Unlike most C functions, < code > C.malloc</ code > may not be used in a
267
+ two-result form returning an errno value.
268
+ </ p >
269
+
270
+ < p > <!-- CL 33237 -->
271
+ If < a href ="/cmd/cgo/ "> cgo</ a > is used to call a C function passing a
272
+ pointer to a C union, and if the C union can contain any pointer
273
+ values, and if < a href ="/cmd/cgo/#hdr-Passing_pointers "> cgo pointer
274
+ checking</ a > is enabled (as it is by default), the union value is now
275
+ checked for Go pointers.
276
+ </ p >
248
277
249
278
< h3 id ="gccgo "> Gccgo</ h3 >
250
279
0 commit comments