Bug#1086475: gcc-14: go support for hurd-amd64
Samuel Thibault, le jeu. 31 oct. 2024 00:34:37 +0100, a ecrit:
> Samuel Thibault, le jeu. 31 oct. 2024 00:31:56 +0100, a ecrit:
> > Could you apply the attach patch, already commited upstream? This fixes
> > go on hurd-amd64.
>
> I forgot to provide the patch to record the patch in rules.patch
Bleh, I also forgot to re-path the upstream commit.
Here they are again, both.
Samuel
commit aad9de322774c25e80f3ade6ecd96f45b62bf40a
Author: Ian Lance Taylor <iant@golang.org>
Date: Tue Oct 29 15:39:02 2024 -0700
syscall: don't define syscall stub on Hurd
Patch from Samuel Thibault.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/623415
diff --git a/src/libgo/go/syscall/syscall_funcs.go b/src/libgo/go/syscall/syscall_funcs.go
index a906fa5a42e..fc14cb18286 100644
--- a/src/libgo/go/syscall/syscall_funcs.go
+++ b/src/libgo/go/syscall/syscall_funcs.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
-// +build darwin dragonfly freebsd hurd linux netbsd openbsd solaris
+//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package syscall
diff --git a/src/libgo/go/syscall/syscall_funcs_stubs.go b/src/libgo/go/syscall/syscall_funcs_stubs.go
index 11f12bd9ae3..e37a6483b02 100644
--- a/src/libgo/go/syscall/syscall_funcs_stubs.go
+++ b/src/libgo/go/syscall/syscall_funcs_stubs.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || rtems
-// +build aix rtems
+//go:build aix || hurd || rtems
+// +build aix hurd rtems
// These are stubs.
diff --git a/src/libgo/runtime/go-nosys.c b/src/libgo/runtime/go-nosys.c
index 30222df7815..cd3e7664ca0 100644
--- a/src/libgo/runtime/go-nosys.c
+++ b/src/libgo/runtime/go-nosys.c
@@ -504,7 +504,7 @@ strerror_r (int errnum, char *buf, size_t buflen)
#endif /* ! HAVE_STRERROR_R */
-#ifndef HAVE_SYSCALL
+#if !defined(HAVE_SYSCALL) && !defined(__GNU__) /* GNU/Hurd already has a stub */
int
syscall(int number __attribute__ ((unused)), ...)
{
diff --git a/debian/rules.patch b/debian/rules.patch
index dd8cab37..333b2843 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -211,6 +211,7 @@ ifeq ($(DEB_TARGET_ARCH_OS),hurd)
debian_patches += hurd-changes
# FIXME: #1005297, PR 104660
debian_patches += libgo-hurd-hack
+ debian_patches += libgo-hurd-syscall
endif
debian_patches += gcc-ice-dump
Reply to: