summaryrefslogtreecommitdiff
path: root/system/gcc/338-gccgo-syscall.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-23 23:40:10 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-07 09:57:51 -0500
commit93cf7fc8b05fe3003b6f16b766622544cdf3830b (patch)
tree594b1c2e06144b9e0b0dae1310399b5935ddc5ff /system/gcc/338-gccgo-syscall.patch
parentd15fa95546e4f4200700750986fb5e249d9bfbe1 (diff)
downloadpackages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.gz
packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.bz2
packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.xz
packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.zip
system/gcc: Update to 13.3.0
0012-static-pie and 201-ada were forward-ported by my own paws. Three digit 0xx underscore patches are from Gentoo. This is also the source of the insn-split and match-split patches, which significantly increase performance on build. They are also the source of the new configure option --with-matchpd-partitions. On systems with very many cores/threads, a number higher than 32 would probably perform even better, but 32 should give decent perf on 8+ threads, and runs quite nicely on the 64-thread Talos II I ran the testbuild on. 202 is from Void. The 300s are originally written by me. The Ada patch now includes an improvement to use posix_openpt instead of getpt, which fixes link errors later on. We also now use STAGE1_CFLAGS and BOOT_CFLAGS to improve build times. Improvement was clocked from 40m to 32m (-8m, or 20%) on gwyn. The patch for Go name mangling is needed to build packages that use reflect2, which includes user/gitlab-runner.
Diffstat (limited to 'system/gcc/338-gccgo-syscall.patch')
-rw-r--r--system/gcc/338-gccgo-syscall.patch115
1 files changed, 0 insertions, 115 deletions
diff --git a/system/gcc/338-gccgo-syscall.patch b/system/gcc/338-gccgo-syscall.patch
deleted file mode 100644
index a4ecb5b6b..000000000
--- a/system/gcc/338-gccgo-syscall.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -Naur gcc-8.3.0-orig/libgo/go/runtime/stubs.go gcc-8.3.0/libgo/go/runtime/stubs.go
---- gcc-8.3.0-orig/libgo/go/runtime/stubs.go 2019-04-25 03:03:52.311215191 +0000
-+++ gcc-8.3.0/libgo/go/runtime/stubs.go 2019-04-25 03:03:27.973824045 +0000
-@@ -284,8 +284,7 @@
- // For gccgo this is in the C code.
- func osyield()
-
--// For gccgo this can be called directly.
--//extern syscall
-+//extern __go_syscall6
- func syscall(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) uintptr
-
- // For gccgo, to communicate from the C code to the Go code.
-diff -Naur gcc-8.3.0-orig/libgo/go/syscall/syscall_unix.go gcc-8.3.0/libgo/go/syscall/syscall_unix.go
---- gcc-8.3.0-orig/libgo/go/syscall/syscall_unix.go 2019-04-25 03:04:55.064488337 +0000
-+++ gcc-8.3.0/libgo/go/syscall/syscall_unix.go 2019-04-25 03:08:23.612133013 +0000
-@@ -19,11 +19,8 @@
- Stderr = 2
- )
-
--//extern syscall
--func c_syscall32(trap int32, a1, a2, a3, a4, a5, a6 int32) int32
--
--//extern syscall
--func c_syscall64(trap int64, a1, a2, a3, a4, a5, a6 int64) int64
-+//extern __go_syscall6
-+func syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) uintptr
-
- const (
- darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
-@@ -38,14 +35,7 @@
- func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
- Entersyscall()
- SetErrno(0)
-- var r uintptr
-- if unsafe.Sizeof(r) == 4 {
-- r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), 0, 0, 0)
-- r = uintptr(r1)
-- } else {
-- r1 := c_syscall64(int64(trap), int64(a1), int64(a2), int64(a3), 0, 0, 0)
-- r = uintptr(r1)
-- }
-+ r := syscall6(trap, a1, a2, a3, 0, 0, 0)
- err = GetErrno()
- Exitsyscall()
- return r, 0, err
-@@ -54,47 +44,22 @@
- func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
- Entersyscall()
- SetErrno(0)
-- var r uintptr
-- if unsafe.Sizeof(r) == 4 {
-- r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3),
-- int32(a4), int32(a5), int32(a6))
-- r = uintptr(r1)
-- } else {
-- r1 := c_syscall64(int64(trap), int64(a1), int64(a2), int64(a3),
-- int64(a4), int64(a5), int64(a6))
-- r = uintptr(r1)
-- }
-+ r := syscall6(trap, a1, a2, a3, a4, a5, a6)
- err = GetErrno()
- Exitsyscall()
- return r, 0, err
- }
-
- func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
-- var r uintptr
- SetErrno(0)
-- if unsafe.Sizeof(r) == 4 {
-- r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), 0, 0, 0)
-- r = uintptr(r1)
-- } else {
-- r1 := c_syscall64(int64(trap), int64(a1), int64(a2), int64(a3), 0, 0, 0)
-- r = uintptr(r1)
-- }
-+ r := syscall6(trap, a1, a2, a3, 0, 0, 0)
- err = GetErrno()
- return r, 0, err
- }
-
- func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
-- var r uintptr
- SetErrno(0)
-- if unsafe.Sizeof(r) == 4 {
-- r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3),
-- int32(a4), int32(a5), int32(a6))
-- r = uintptr(r1)
-- } else {
-- r1 := c_syscall64(int64(trap), int64(a1), int64(a2), int64(a3),
-- int64(a4), int64(a5), int64(a6))
-- r = uintptr(r1)
-- }
-+ r := syscall6(trap, a1, a2, a3, a4, a5, a6)
- err = GetErrno()
- return r, 0, err
- }
-diff -Naur gcc-8.3.0-orig/libgo/runtime/go-varargs.c gcc-8.3.0/libgo/runtime/go-varargs.c
---- gcc-8.3.0-orig/libgo/runtime/go-varargs.c 2015-11-06 19:15:45.000000000 +0000
-+++ gcc-8.3.0/libgo/runtime/go-varargs.c 2019-04-25 03:14:11.404851275 +0000
-@@ -89,3 +89,14 @@
- }
-
- #endif
-+
-+// __go_syscall6 is called by both the runtime and syscall packages.
-+// We use uintptr_t to make sure that the types match, since the Go
-+// and C "int" types are not the same.
-+
-+uintptr_t
-+__go_syscall6(uintptr_t flag, uintptr_t a1, uintptr_t a2, uintptr_t a3,
-+ uintptr_t a4, uintptr_t a5, uintptr_t a6)
-+{
-+ return syscall (flag, a1, a2, a3, a4, a5, a6);
-+}