We need to patch Go's source code to allow cgo when cross-compiling and make Android-specific changes since it sometimes differs from linux (e.g.: it doesn't use /etc/resolv.conf for DNS config)
- Clone the go source:
hg clone -u release https://code.google.com/p/go
- Enter the go source directory:
cd go
- Apply the patch in this gist:
patch -p1 < /path/to/patch/go_android.patch
- Enter the go/src directory:
cd src