$OpenBSD: patch-src_cmd_go_internal_load_pkg_go,v 1.2 2021/08/27 18:33:27 jsing Exp $

Index: src/cmd/go/internal/load/pkg.go
--- src/cmd/go/internal/load/pkg.go.orig
+++ src/cmd/go/internal/load/pkg.go
@@ -2245,11 +2245,11 @@ func externalLinkingForced(p *Package) bool {
 	// Some targets must use external linking even inside GOROOT.
 	switch cfg.BuildContext.GOOS {
 	case "android":
-		if cfg.BuildContext.GOARCH != "arm64" {
-			return true
-		}
+		return cfg.BuildContext.GOARCH != "arm64"
 	case "ios":
 		return true
+	case "openbsd":
+		return cfg.BuildContext.GOARCH == "mips64"
 	}
 
 	// Currently build modes c-shared, pie (on systems that do not
