# Drop .la files like everyone else.
find . -name Makefile.in \
diff --git a/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
b/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
deleted file mode 100644
index 76e9e67..0000000
--- a/gnu/gcc/patches/0001-libgo-Add-support-for-libucontext.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0631e2b9453b33c42e12a14c11e8257d470016c5 Mon Sep 17 00:00:00 2001
-From: Ismael Luceno <ismael AT sourcemage.org>
-Date: Sun, 11 Dec 2022 23:55:56 +0100
-Subject: [PATCH] libgo: Add support for libucontext
-
-Test and link to libucontext if detected; additionally: undefine
-SETCONTEXT_CLOBBERS_TLS in runtime/proc.c to prevent the use of
-makecontext/swapcontext, not supported by libucontext.
-
-[ismael AT iodev.co.uk: Fixed to work with glibc too, tests for libucontext
- properly; improved commit message]
-
-Based on a patch by Sören Tempel <soeren+git AT soeren-tempel.net>.
-
-Upstream-Status: Pending
-Origin: Unknown
-Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
----
- Makefile.in | 2 ++
- libgo/runtime/proc.c | 6 ++++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 593495e1650..c3e5d489bc0 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -52801,6 +52801,8 @@ configure-target-libgo:
- esac; \
- module_srcdir=libgo; \
- rm -f no-such-file || : ; \
-+ LIBS="`printf 'int main(){return 0;}' | $(CC) -x c -o /dev/null \
-+ - -lucontext && printf -lucontext` $$LIBS" \
- CONFIG_SITE=no-such-file $(SHELL) \
- $$s/$$module_srcdir/configure \
- --srcdir=$${topdir}/$$module_srcdir \
-diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
-index 3a30748d329..a987678fa84 100644
---- a/libgo/runtime/proc.c
-+++ b/libgo/runtime/proc.c
-@@ -66,6 +66,12 @@ static void gscanstack(G*);
-
- __thread G *g __asm__(GOSYM_PREFIX "runtime.g");
-
-+/* libucontext does not seem to support tlsbase, undef the macro
-+ * here to make sure we define initcontext and fixcontext as dummies. */
-+#if !defined(__GLIBC__) && defined(__linux__)
-+#undef SETCONTEXT_CLOBBERS_TLS
-+#endif
-+
- #ifndef SETCONTEXT_CLOBBERS_TLS
-
- static inline void
diff --git
a/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
b/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
deleted file mode 100644
index 61875e2..0000000
---
a/gnu/gcc/patches/0001-libgo-include-asm-ptrace.h-for-pt_regs-definition-on-PowerPC.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From cf41d579088e1c0b5c33c93657ad041e797b5905 Mon Sep 17 00:00:00 2001
-From: Sören Tempel <soeren AT soeren-tempel.net>
-Date: Sun, 2 Jan 2022 01:07:03 +0100
-Subject: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on
PowerPC
-
-Both glibc and musl libc declare pt_regs as an incomplete type. This
-type has to be completed by inclusion of another header. On Linux, the
-asm/ptrace.h header file provides this type definition. Without
-including this header file, it is not possible to access the regs member
-of the mcontext_t struct as done in libgo/runtime/go-signal.c. On glibc,
-other headers (e.g. sys/user.h) include asm/ptrace.h but on musl
-asm/ptrace.h is not included by other headers and thus the
-aforementioned files do not compile without an explicit include of
-asm/ptrace.h:
-
- libgo/runtime/go-signal.c: In function 'getSiginfo':
- libgo/runtime/go-signal.c:227:63: error: invalid use of undefined
type 'struct pt_regs'
- 227 | ret.sigpc =
((ucontext_t*)(context))->uc_mcontext.regs->nip;
- |
-
-Instead of including the asm/ptrace.h header conditionally on PowerPC
-only it would alternatively also be possible to include it
-unconditionally.
-
-See also:
-
-* https://git.musl-libc.org/cgit/musl/commit/?id=c2518a8efb6507f1b41c3b12e03b06f8f2317a1f
-* https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d57cb31910ca5c200e4172276749a7f8bd17ae3c
-* https://github.com/kaniini/libucontext/issues/36
-
-Signed-off-by: Sören Tempel <soeren AT soeren-tempel.net>
-Origin: Alpine Linux
----
- libgo/runtime/go-signal.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
-index 528d9b6d9fe..c67503f0a79 100644
---- a/libgo/runtime/go-signal.c
-+++ b/libgo/runtime/go-signal.c
-@@ -10,6 +10,12 @@
- #include <sys/time.h>
- #include <ucontext.h>
-
-+// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
-+// type. This type must be completed by including asm/ptrace.h.
-+#ifdef __PPC__
-+#include <asm/ptrace.h>
-+#endif
-+
- #include "runtime.h"
-
- #ifndef SA_RESTART
diff --git
a/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
b/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
deleted file mode 100644
index 84bca89..0000000
--- a/gnu/gcc/patches/0001-libgo-make-match.sh-POSIX-shell-compatible.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 75a430f66760802bf1ac5afcd716613e3cf8c77d Mon Sep 17 00:00:00 2001
-From: Sören Tempel <soeren+git AT soeren-tempel.net>
-Date: Tue, 19 Jul 2022 07:15:25 +0200
-Subject: [PATCH] libgo: make match.sh POSIX-shell compatible
-
-The `(( expression ))` syntax is a Bash extension. However, the
-arithmetic expressions used by the gobuild() function can also
-be expressed using Arithmetic POSIX Expansion with `$(( expression ))`.
-Contrary to the Bash expression, the Arithmetic Expansion doesn't set
-the return value if the expression is non-zero but instead just prints
-the expression result. Hence, the expression also needs to be negated.
----
- libgo/match.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgo/match.sh b/libgo/match.sh
-index 7ed587ff794..b355d47429a 100755
---- a/libgo/match.sh
-+++ b/libgo/match.sh
-@@ -111,7 +111,7 @@ gobuild() {
- if test "$goarch" != "386"; then
- line=$(echo "$line" | sed -e
"s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
- fi
-- (($line))
-+ return $((!line))
- }
-
- matched=
diff --git
a/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
b/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
deleted file mode 100644
index a5ad797..0000000
--- a/gnu/gcc/patches/0034-Use-generic-errstr.go-implementation-on-musl.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Tue, 29 Nov 2022 17:28:44 -0800
-Subject: [PATCH] syscall, runtime: always call XSI strerror_r
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This does the right thing for either glibc or musl on GNU/Linux.
-
-Based on patch by Sören Tempel.
-
-Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
-TryBot-Bypass: Ian Lance Taylor <iant AT google.com>
----
- libgo/Makefile.am | 1 +
- libgo/Makefile.in | 6 +++++-
- libgo/go/syscall/errstr.go | 22 ++++++++-----------
- libgo/go/syscall/errstr_glibc.go | 33 ----------------------------
- libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++
- 5 files changed, 52 insertions(+), 47 deletions(-)
- delete mode 100644 libgo/go/syscall/errstr_glibc.go
- create mode 100644 libgo/runtime/go-strerror.c
-
-diff --git a/libgo/Makefile.am b/libgo/Makefile.am
-index e0a1eec5..df568743 100644
---- a/libgo/Makefile.am
-+++ b/libgo/Makefile.am
-@@ -465,6 +465,7 @@ runtime_files = \
- runtime/go-nanotime.c \
- runtime/go-now.c \
- runtime/go-nosys.c \
-+ runtime/go-strerror.c \
- runtime/go-reflect-call.c \
- runtime/go-setenv.c \
- runtime/go-signal.c \
-diff --git a/libgo/Makefile.in b/libgo/Makefile.in
-index 7bef5df9..f2f3f0fc 100644
---- a/libgo/Makefile.in
-+++ b/libgo/Makefile.in
-@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \
- runtime/go-fieldtrack.lo runtime/go-matherr.lo \
- runtime/go-memclr.lo runtime/go-memmove.lo \
- runtime/go-memequal.lo runtime/go-nanotime.lo \
-- runtime/go-now.lo runtime/go-nosys.lo \
-+ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \
- runtime/go-reflect-call.lo runtime/go-setenv.lo \
- runtime/go-signal.lo runtime/go-unsafe-pointer.lo \
- runtime/go-unsetenv.lo runtime/go-unwind.lo \
-@@ -917,6 +917,7 @@ runtime_files = \
- runtime/go-nanotime.c \
- runtime/go-now.c \
- runtime/go-nosys.c \
-+ runtime/go-strerror.c \
- runtime/go-reflect-call.c \
- runtime/go-setenv.c \
- runtime/go-signal.c \
-@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-nosys.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
-+runtime/go-strerror.lo: runtime/$(am__dirstamp) \
-+ runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
- runtime/go-setenv.lo: runtime/$(am__dirstamp) \
-@@ -1457,6 +1460,7 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
- @AMDEP_TRUE@@am__include@
@am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
-diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
-index 6c2441d3..9f688e2a 100644
---- a/libgo/go/syscall/errstr.go
-+++ b/libgo/go/syscall/errstr.go
-@@ -4,23 +4,19 @@
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
--// +build !hurd
--// +build !linux
--
- package syscall
-
--//sysnb strerror_r(errnum int, buf []byte) (err Errno)
--//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int
-+import "internal/bytealg"
-+
-+//extern go_strerror
-+func go_strerror(_C_int, *byte, Size_t) _C_int
-
- func Errstr(errnum int) string {
-- for len := 128; ; len *= 2 {
-- b := make([]byte, len)
-- errno := strerror_r(errnum, b)
-+ for size := 128; ; size *= 2 {
-+ b := make([]byte, size)
-+ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b)))
- if errno == 0 {
-- i := 0
-- for b[i] != 0 {
-- i++
-- }
-+ i := bytealg.IndexByte(b, 0)
- // Lowercase first letter: Bad -> bad, but
- // STREAM -> STREAM.
- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1]
&& b[1] <= 'z' {
-@@ -29,7 +25,7 @@ func Errstr(errnum int) string {
- return string(b[:i])
- }
- if errno != ERANGE {
-- return "errstr failure"
-+ return "strerror_r failure"
- }
- }
- }
-diff --git a/libgo/go/syscall/errstr_glibc.go
b/libgo/go/syscall/errstr_glibc.go
-deleted file mode 100644
-index 5b19e6f2..00000000
---- a/libgo/go/syscall/errstr_glibc.go
-+++ /dev/null
-@@ -1,33 +0,0 @@
--// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
--
--// Copyright 2010 The Go Authors. All rights reserved.
--// Use of this source code is governed by a BSD-style
--// license that can be found in the LICENSE file.
--
--// We use this rather than errstr.go because on GNU/Linux sterror_r
--// returns a pointer to the error message, and may not use buf at all.
--
--// +build hurd linux
--
--package syscall
--
--import "unsafe"
--
--//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
--//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
--
--func Errstr(errnum int) string {
-- a := make([]byte, 128)
-- p := strerror_r(errnum, a)
-- b := (*[1000]byte)(unsafe.Pointer(p))
-- i := 0
-- for b[i] != 0 {
-- i++
-- }
-- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
-- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
-- c := b[0] + 'a' - 'A'
-- return string(c) + string(b[1:i])
-- }
-- return string(b[:i])
--}
-diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
-new file mode 100644
-index 00000000..13d1d91d
---- /dev/null
-+++ b/libgo/runtime/go-strerror.c
-@@ -0,0 +1,37 @@
-+/* go-strerror.c -- wrapper around XSI-compliant strerror_r.
-+
-+ Copyright 2022 The Go Authors. All rights reserved.
-+ Use of this source code is governed by a BSD-style
-+ license that can be found in the LICENSE file. */
-+
-+/* There are two version of strerror_r on GNU/Linux: a GNU-specific
-+ and an XSI-compliant version. The former version is only available
-+ on glibc. Since glibc 2.13, the XSI-compliant version is also
-+ provided by glibc if _GNU_SOURCE is not defined. Since the
-+ entirety of gofrontend is compiled with _GNU_SOURCE, this file
-+ exists to selectively undefine it and provides an alias to the
-+ XSI-compliant version of strerror_r(3). */
-+
-+#ifdef __linux__
-+
-+/* Force selection of XSI-compliant strerror_r by glibc. */
-+#undef XOPEN_SOURCE
-+#define XOPEN_SOURCE 600
-+#undef _POSIX_C_SOURCE
-+#define _POSIX_C_SOURCE 200112L
-+#undef _GNU_SOURCE
-+
-+#endif /* __linux__ */
-+
-+#include <string.h>
-+
-+#ifndef HAVE_STRERROR_R
-+// Provided by go-nosys.c if not provided by libc itself.
-+extern int strerror_r (int, char *, size_t);
-+#endif
-+
-+int
-+go_strerror (int errnum, char *buf, size_t buflen)
-+{
-+ return strerror_r (errnum, buf, buflen);
-+}
diff --git
a/gnu/gcc/patches/0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
b/gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
deleted file mode 100644
index 94bb9fc..0000000
---
a/gnu/gcc/patches/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Wed, 26 Oct 2022 17:23:42 -0700
-Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The last argument to the C mmap function is type off_t, not uintptr.
-On some 32-bit systems, off_t is larger than uintptr.
-
-Based on patch by Sören Tempel.
-
-Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Than McIntosh <thanm AT google.com>
----
- libgo/go/runtime/mem_gccgo.go | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
-index fa3389d8..1e84f4f5 100644
---- a/libgo/go/runtime/mem_gccgo.go
-+++ b/libgo/go/runtime/mem_gccgo.go
-@@ -15,7 +15,7 @@ import (
- //go:linkname sysFree
-
- //extern mmap
--func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
uintptr) unsafe.Pointer
-+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
_libgo_off_t_type) unsafe.Pointer
-
- //extern munmap
- func munmap(addr unsafe.Pointer, length uintptr) int32
-@@ -38,7 +38,7 @@ func init() {
- }
-
- func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off
uintptr) (unsafe.Pointer, int) {
-- p := sysMmap(addr, n, prot, flags, fd, off)
-+ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off))
- if uintptr(p) == _MAP_FAILED {
- return nil, errno()
- }
diff --git
a/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
b/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
deleted file mode 100644
index 5cebe74..0000000
---
a/gnu/gcc/patches/0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From c86b726c048eddc1be320c0bf64a897658bee13d Mon Sep 17 00:00:00 2001
-From: Uros Bizjak <ubizjak AT gmail.com>
-Date: Wed, 18 May 2022 20:03:26 +0200
-Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
- TARGET_CAN_SPLIT_STACK
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
-is only supported on glibc targets. However, this original commit
-required some fixups. As part of the fixup, the changes to the
-gnu-user-common.h and gnu.h were partially reverted in commit
-60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
-to be defined for non-glibc targets even though -fsplit-stack is
-actually not supported and attempting to use it causes a runtime error.
-
-This causes gcc internal code, such as ./gcc/go/gospec.c to not
-correctly detect that -fsplit-stack is not supported and thus causes
-gccgo to fail compilation on non-glibc targets.
-
-This commit ensures that TARGET_CAN_SPLIT_STACK is only set if the
-default libc is glibc. It is presently unclear to me if there is a
-better way to detect glibc at pre-processor time.
-
-The proposed changes have been tested on x86 and x86_64 Alpine Linux
-(which uses musl libc) and fix compilation of gccgo for this target.
-
-Signed-off-by: Sören Tempel <soeren AT soeren-tempel.net>
-
-gcc/ChangeLog:
-
- * config/i386/gnu-user-common.h (defined): Only define
- TARGET_CAN_SPLIT_STACK for glibc targets.
- * config/i386/gnu.h (defined): Ditto.
----
- gcc/config/i386/gnu-user-common.h | 5 +++--
- gcc/config/i386/gnu.h | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/i386/gnu-user-common.h
b/gcc/config/i386/gnu-user-common.h
-index 23b54c5be52..cab9be2bfb7 100644
---- a/gcc/config/i386/gnu-user-common.h
-+++ b/gcc/config/i386/gnu-user-common.h
-@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
- #define STACK_CHECK_STATIC_BUILTIN 1
-
- /* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
-+ assembler has full support for the CFI directives. Also
-+ we only support -fsplit-stack on glibc targets. */
-+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
- #define TARGET_CAN_SPLIT_STACK
- #endif
-diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
-index 401e60c9a02..fb8d69a97d8 100644
---- a/gcc/config/i386/gnu.h
-+++ b/gcc/config/i386/gnu.h
-@@ -41,8 +41,9 @@ along with GCC. If not, see
<http://www.gnu.org/licenses/>.
- #define TARGET_THREAD_SSP_OFFSET 0x14
-
- /* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
-+ assembler has full support for the CFI directives. Also
-+ we only support -fsplit-stack on glibc targets. */
-+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
- #define TARGET_CAN_SPLIT_STACK
- #endif
- /* We steal the last transactional memory word. */
diff --git
a/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
b/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
deleted file mode 100644
index db38df3..0000000
--- a/gnu/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Wed, 29 Jun 2022 15:32:04 -0700
-Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Patches for musl support, from Sören Tempel.
-
-Fixes https://gcc.gnu.org/PR105225
-
-Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294
-Reviewed-by: Than McIntosh <thanm AT google.com>
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
----
- libgo/mksysinfo.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
-index 5aa30915..ea1fa17d 100755
---- a/libgo/mksysinfo.sh
-+++ b/libgo/mksysinfo.sh
-@@ -127,6 +127,7 @@ fi
-
- # The syscall numbers. We force the names to upper case.
- grep '^const _SYS_' gen-sysinfo.go | \
-+ grep -v '^const _SYS_SECCOMP = ' | \
- sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
- while read sys; do
- sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ`
-@@ -506,7 +507,7 @@ fi
-
- # For historical reasons Go uses the suffix "timespec" instead of "tim" for
- # stat_t's time fields on NetBSD.
--st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
-+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
- if test "${GOOS}" = "netbsd"; then
- st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e
s/st_ctim/Ctimespec/'
- fi
diff --git
a/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
b/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
deleted file mode 100644
index 0f949be..0000000
--- a/gnu/gcc/patches/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 8f1a91aeff400d572857895b7f5e863ec5a4d93e Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Mon, 26 Sep 2022 15:03:53 -0400
-Subject: [PATCH] runtime: portable access to sigev_notify_thread_id
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Previously, libgo relied on the _sigev_un implementation-specific
-field in struct sigevent, which is only available on glibc.
-This patch uses the sigev_notify_thread_id macro instead which is
-mandated by timer_create(2). In theory, this should work with any libc
-implementation for Linux. Unfortunately, there is an open glibc bug
-as glibc does not define this macro. For this reason, a glibc-specific
-workaround is required. Other libcs (such as musl) define the macro
-and don't require the workaround.
-
-See https://sourceware.org/bugzilla/show_bug.cgi?id=27417
-
-This makes libgo compatible with musl libc.
-
-Based on patch by Sören Tempel.
-
-Change-Id: I0924a53d5212730ebc395ecf9199f85967be8cc6
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
-Reviewed-by: Than McIntosh <thanm AT google.com>
----
- libgo/go/runtime/os_linux.go | 12 +++++++++++-
- libgo/runtime/go-signal.c | 18 ++++++++++++++++++
- 2 files changed, 29 insertions(+), 1 deletion(-)
-
-diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
-index 96fb1788..2b2d827c 100644
---- a/libgo/go/runtime/os_linux.go
-+++ b/libgo/go/runtime/os_linux.go
-@@ -22,6 +22,12 @@ type mOS struct {
- profileTimerValid uint32
- }
-
-+// setSigeventTID is written in C to set the sigev_notify_thread_id
-+// field of a sigevent struct.
-+//
-+//go:noescape
-+func setSigeventTID(*_sigevent, int32)
-+
- func getProcID() uint64 {
- return uint64(gettid())
- }
-@@ -52,9 +58,12 @@ const (
- )
-
- // Atomically,
-+//
- // if(*addr == val) sleep
-+//
- // Might be woken up spuriously; that's allowed.
- // Don't sleep longer than ns; ns < 0 means forever.
-+//
- //go:nosplit
- func futexsleep(addr *uint32, val uint32, ns int64) {
- // Some Linux kernels have a bug where futex of
-@@ -73,6 +82,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
- }
-
- // If any procs are sleeping on addr, wake up at most cnt.
-+//
- //go:nosplit
- func futexwakeup(addr *uint32, cnt uint32) {
- ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil,
nil, 0)
-@@ -365,7 +375,7 @@ func setThreadCPUProfiler(hz int32) {
- var sevp _sigevent
- sevp.sigev_notify = _SIGEV_THREAD_ID
- sevp.sigev_signo = _SIGPROF
-- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
-+ setSigeventTID(&sevp, int32(mp.procid))
- ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
- if ret != 0 {
- // If we cannot create a timer for this M, leave
profileTimerValid false
-diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
-index 528d9b6d..aa1b6305 100644
---- a/libgo/runtime/go-signal.c
-+++ b/libgo/runtime/go-signal.c
-@@ -183,6 +183,24 @@ setSigactionHandler(struct sigaction* sa, uintptr
handler)
- sa->sa_sigaction = (void*)(handler);
- }
-
-+#ifdef __linux__
-+
-+// Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=27417
-+#ifndef sigev_notify_thread_id
-+ #define sigev_notify_thread_id _sigev_un._tid
-+#endif
-+
-+void setSigeventTID(struct sigevent*, int32_t)
-+ __asm__ (GOSYM_PREFIX "runtime.setSigeventTID");
-+
-+void
-+setSigeventTID(struct sigevent *sev, int32_t v)
-+{
-+ sev->sigev_notify_thread_id = v;
-+}
-+
-+#endif // defined(__linux__)
-+
- // C code to fetch values from the siginfo_t and ucontext_t pointers
- // passed to a signal handler.
-
diff --git
a/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
b/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
deleted file mode 100644
index f2f0191..0000000
---
a/gnu/gcc/patches/0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
-From: Ian Lance Taylor <iant AT golang.org>
-Date: Sat, 30 Jul 2022 07:29:28 -0700
-Subject: [PATCH] libgo: use SYS_timer_settime32
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
-
-Based on patch by Sören Tempel.
-
-Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
-Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
-Reviewed-by: Ian Lance Taylor <iant AT google.com>
-Reviewed-by: Cherry Mui <cherryyz AT google.com>
----
- libgo/sysinfo.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
-index fc021099..180f5c31 100644
---- a/libgo/sysinfo.c
-+++ b/libgo/sysinfo.c
-@@ -354,6 +354,11 @@ enum {
- };
- #endif
-
-+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
-+// musl defines SYS_timer_settim32 on 32-bit systems.
-+#define SYS_timer_settime SYS_timer_settime32
-+#endif
-+
- #if defined(HAVE_LOFF_T)
- // loff_t can be defined as a macro; for -fgo-dump-spec make sure we
- // see a typedef.
[SM-Commit] GIT changes to master grimoire by Ismael Luceno (30181345bccb302920b79429f96889285682b18f),
Ismael Luceno, 07/11/2023