https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731
--- Comment #28 from Ian Lance Taylor <ian at airs dot com> --- Currently there is no reasonable way to use the Go DNS resolver when using gccgo. Any program that uses the net package will call glibc for DNS resolution, meaning that you are limited to what glibc will do, which, as you say, means calling dlopen. go build -a does not work with gccgo. The problem is that gccgo uses its own copy of the Go library sources and they can not be built with go build -a. It would be nice to fix this but it is not at all a priority, since most people will use the installed libgo.