From 9fc3feb441d660d63409c83574803d8efe01b351 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Fri, 4 Aug 2023 21:27:20 +1000 Subject: runtime,syscall: invert openbsd architecture tests Rather than testing for architectures that use libc-based system calls, test that it is not the single architecture that Go is still using direct system calls. This reduces the number of changes needed for new openbsd ports. Updates #36435 Updates #61546 Change-Id: I79c4597c629b8b372e9efcda79e8f6ff778b9e8e Reviewed-on: https://go-review.googlesource.com/c/go/+/516016 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Run-TryBot: Joel Sing TryBot-Result: Gopher Robot --- src/runtime/proc.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/runtime') diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 047b359d3d..fafab7f58c 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -1497,7 +1497,7 @@ func usesLibcall() bool { case "aix", "darwin", "illumos", "ios", "solaris", "windows": return true case "openbsd": - return GOARCH == "386" || GOARCH == "amd64" || GOARCH == "arm" || GOARCH == "arm64" + return GOARCH != "mips64" } return false } @@ -1509,10 +1509,7 @@ func mStackIsSystemAllocated() bool { case "aix", "darwin", "plan9", "illumos", "ios", "solaris", "windows": return true case "openbsd": - switch GOARCH { - case "386", "amd64", "arm", "arm64": - return true - } + return GOARCH != "mips64" } return false } -- cgit v1.3-5-g9baa