https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731
--- Comment #8 from Yohei Ueda <yohei at jp dot ibm.com> --- If we can distinguish between the "not found" errors due to invalid host names and no nss, we can fall back to netgo only when nss is not available. I noticed that errno is set to 0 for invalid hostnames, and is set to ENOENT when nss is not available. However, this behavior is not documented, so it is probably implementation dependent. I think a practical solution to this issue is to enable the -a option of the go command for the standard library in GCCGO. I know Lynn is working on the go command for GCCGO. https://groups.google.com/forum/#!topic/gofrontend-dev/1Gm87ieI47Q What do you think?