From 0afbeb510269dc4aaaff733166085eba42144712 Mon Sep 17 00:00:00 2001 From: Jorropo Date: Thu, 23 Oct 2025 10:47:58 +0200 Subject: [PATCH] runtime: add ppc and s390 to linux 32 bits syscall build constraints for gccgo Theses are not supported by the go compiler but it may helps porting to gccgo. This is similar to reverting CL 712740 however unlike reverting: - it fixes the build tags so that 32 & 64 bits constraints are complement of each other - it applies the same changes to os_linux_settime32.go and os_linux_settime64.go since the four files are the exact same fix of the same bug to different parts of the codebase. It does not make sense for them to be different. Change-Id: I08cdcb07e837a5e06ee6f04b7868a4c57b07dd56 Reviewed-on: https://go-review.googlesource.com/c/go/+/714080 Reviewed-by: David Chase Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- src/runtime/os_linux_futex32.go | 2 +- src/runtime/os_linux_futex64.go | 2 +- src/runtime/os_linux_settime32.go | 2 +- src/runtime/os_linux_settime64.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/os_linux_futex32.go b/src/runtime/os_linux_futex32.go index dbbd86cb39..c5cffa24d1 100644 --- a/src/runtime/os_linux_futex32.go +++ b/src/runtime/os_linux_futex32.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && (386 || arm || mips || mipsle) +//go:build linux && (386 || arm || mips || mipsle || (gccgo && (ppc || s390))) package runtime diff --git a/src/runtime/os_linux_futex64.go b/src/runtime/os_linux_futex64.go index ce0b08c7ba..2448e30cf1 100644 --- a/src/runtime/os_linux_futex64.go +++ b/src/runtime/os_linux_futex64.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && !(386 || arm || mips || mipsle) +//go:build linux && !(386 || arm || mips || mipsle || (gccgo && (ppc || s390))) package runtime diff --git a/src/runtime/os_linux_settime32.go b/src/runtime/os_linux_settime32.go index 30f95455bf..e6c5d9f95c 100644 --- a/src/runtime/os_linux_settime32.go +++ b/src/runtime/os_linux_settime32.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && (386 || arm || mips || mipsle) +//go:build linux && (386 || arm || mips || mipsle || (gccgo && (ppc || s390))) package runtime diff --git a/src/runtime/os_linux_settime64.go b/src/runtime/os_linux_settime64.go index 60650da33f..dfacf5612d 100644 --- a/src/runtime/os_linux_settime64.go +++ b/src/runtime/os_linux_settime64.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && !(386 || arm || mips || mipsle) +//go:build linux && !(386 || arm || mips || mipsle || (gccgo && (ppc || s390))) package runtime -- 2.52.0