mxcl/homebrew — pull request #17758 by joeshaw (2013-02-11 18:08:29+00:00)
Title: Compiling go with --cross-compile-common breaks x509 certificates

This breaks validation of SSL certificates, and prevents the `go get` tool from working, since it uses SSL to fetch from code.google.com and GitHub, among others.

```
$ brew install go --cross-compile-common
$ go get code.google.com/p/goprotobuf/proto
package code.google.com/p/goprotobuf/proto: Get https://code.google.com/p/goprotobuf/source/checkout?repo=: x509: certificate signed by unknown authority
$
```
```
$ brew install go --fresh
$ go get code.google.com/p/goprotobuf/proto
$
```

Go cannot get any certificates from the OS X keychain when built with `--cross-compile-common`. This is because it uses `cgo` to compile some native C code to access the keychain. For whatever reason, `cgo` seems to be disabled when the toolchain is built, despite `:cgo => true` in the formula. I haven't yet debugged it futher.