cmd/dist: fix build failure of misc/cgo/test on arm64
cmd/dist: fix build failure of misc/cgo/test on arm64

misc/cgo/test fails in 'dist test' on arm64 if the C compiler is of GCC-9.4 or
above and its 'outline atomics' feature is enabled, since the internal linking
hasn't yet supported "__attribute__((constructor))" and also mis-handles hidden
visibility.

This change addresses the problem by skipping the internal linking cases of
misc/cgo/test on linux/arm64. It fixes 'dist test' failure only, user is expected to
pass a GCC option '-mno-outline-atomics' via CGO_CFLAGS if running into the same
problem when building cgo programs using internal linking.

Updates #39466

Change-Id: I57f9e85fca881e5fd2dae6c1b4446bce9e0c1975
Reviewed-on: https://go-review.googlesource.com/c/go/+/262357
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Run-TryBot: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Trust: Emmanuel Odeke <bd234ba4276433f0e5fc7a8fa2d18274fa711567@orijtech.com>

CAFxX/go,CAFxX/go,CAFxX/go,cloudflare/go,cloudflare/go,golang/go,nawawi/go,CAFxX/go,CAFxX/go,nawawi/go,nawawi/go,CAFxX/go,cloudflare/go,nawawi/go,golang/go,nawawi/go,nawawi/go,cloudflare/go,cloudflare/go,cloudflare/go,golang/go,golang/go,CAFxX/go,nawawi/go,golang/go,nawawi/go,golang/go,golang/go,golang/go,cloudflare/go,CAFxX/go,cloudflare/go