You can build Go programs that require external C/C++ libraries using the --deps flag. The dependency must be a configure/make based project provided as a downloadable tarball (.tar, .tar.gz, or .tar.bz2). xgo will download, cross-compile, and cache these dependencies.
Use --depsargs to pass arguments to the dependency's configure script.
Example (with dependency and specific targets):
$ xgo --deps=https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2 \
--targets=windows/* github.com/ethereum/go-ethereum/cmd/geth
Example (with dependency arguments):
$ xgo --deps=https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2 \
--targets=ios/* --depsargs=--disable-assembly \
github.com/ethereum/go-ethereum/cmd/geth