https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- The gc linker does not use the external linker merely because you link against the net package. You need to also pass -linkmode external in ldflags.