https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731
--- Comment #18 from Ian Lance Taylor <ian at airs dot com> --- The -a option to "go build" means to rebuild all packages rather than using the installed versions (see http://golang.org/cmd/go for documentation). The "-tags netgo" option means to build with the build tag netgo (see the build constraints section in http://golang.org/pkg/go/build/). So, yes, it rebuilds the packages for the current link only. This is more reasonable with the gc compiler than with gccgo, since the gc compiler is so fast. I'm OK in principle with coming up with some other approach to direct the Go library to use the Go DNS lookup rather than calling getaddrinfo. I don't think that can be the default. I don't think we want a program to unpredictably sometimes use one and sometimes use the other. I don't think an environment variable would work well, since Yohei presumably wants the statically linked binary to work this way by default. Unfortunately all I can think of would be adding another function to the net package directing lookups to use pure DNS; this is unfortunate because the net package already has the most complex and confusing API of all the standard Go packages.