summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-12-24 11:32:45 +0000
committerMax Rees <maxcrees@me.com>2020-12-24 11:32:45 +0000
commitdcb097f99f983d9a9bc31dc1122fbe0c45e6b1a4 (patch)
treea3fb9318af293ce1524a6ccc73d16f1a21c9d588 /system
parent3465fcf878a4f0e00a9378a4299eaa48a0af5bea (diff)
downloadpackages-gccgo-backport.tar.gz
packages-gccgo-backport.tar.bz2
packages-gccgo-backport.tar.xz
packages-gccgo-backport.zip
system/gcc: backport latest gccgo (~ go 1.15.6)gccgo-backport
Diffstat (limited to 'system')
-rw-r--r--system/gcc/336-gccgo-mmap64.patch9
-rw-r--r--system/gcc/338-gccgo-syscall.patch115
-rw-r--r--system/gcc/339-gccgo-errstr.patch21
-rw-r--r--system/gcc/340-gccgo-time64-stat.patch26
-rw-r--r--system/gcc/APKBUILD21
5 files changed, 38 insertions, 154 deletions
diff --git a/system/gcc/336-gccgo-mmap64.patch b/system/gcc/336-gccgo-mmap64.patch
index 23b4cebc8..692c7f2e0 100644
--- a/system/gcc/336-gccgo-mmap64.patch
+++ b/system/gcc/336-gccgo-mmap64.patch
@@ -18,12 +18,3 @@
p := sysMmap(addr, n, prot, flags, fd, off)
if uintptr(p) == _MAP_FAILED {
return nil, errno()
-@@ -84,7 +84,7 @@
- return true
- }
-
--func mmap_fixed(v unsafe.Pointer, n uintptr, prot, flags, fd int32, offset uintptr) (unsafe.Pointer, int) {
-+func mmap_fixed(v unsafe.Pointer, n uintptr, prot, flags, fd int32, offset int64) (unsafe.Pointer, int) {
- p, err := mmap(v, n, prot, flags, fd, offset)
- // On some systems, mmap ignores v without
- // MAP_FIXED, so retry if the address space is free.
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);
-+}
diff --git a/system/gcc/339-gccgo-errstr.patch b/system/gcc/339-gccgo-errstr.patch
index f78d18aa4..f9a293f22 100644
--- a/system/gcc/339-gccgo-errstr.patch
+++ b/system/gcc/339-gccgo-errstr.patch
@@ -1,7 +1,7 @@
---- gcc-8.3.0/libgo/go/syscall/errstr_linux.go 2016-08-06 00:36:33.000000000 +0000
-+++ /dev/null 2019-04-08 15:05:18.560000000 +0000
-@@ -1,31 +0,0 @@
--// errstr_linux.go -- GNU/Linux specific error strings.
+--- gcc-8.3.0/libgo/go/syscall/errstr_glibc.go 2020-12-24 02:59:14.000000000 +0000
++++ /dev/null 2020-12-07 00:59:39.800000000 +0000
+@@ -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
@@ -10,6 +10,8 @@
-// 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"
@@ -32,14 +34,13 @@
- }
- return string(b[:i])
-}
---- gcc-8.3.0/libgo/go/syscall/errstr.go.old 2016-08-06 00:36:33.000000000 +0000
-+++ gcc-8.3.0/libgo/go/syscall/errstr.go 2019-04-25 05:41:27.915806277 +0000
-@@ -4,8 +4,6 @@
- // Use of this source code is governed by a BSD-style
+--- gcc-8.3.0/libgo/go/syscall/errstr.go 2020-12-23 22:05:12.000000000 +0000
++++ gcc-8.3.0/libgo/go/syscall/errstr.go 2020-12-23 22:39:30.387843188 +0000
+@@ -5,7 +5,6 @@
// license that can be found in the LICENSE file.
+ // +build !hurd
-// +build !linux
--
+
package syscall
- //sysnb strerror_r(errnum int, buf []byte) (err Errno)
diff --git a/system/gcc/340-gccgo-time64-stat.patch b/system/gcc/340-gccgo-time64-stat.patch
index 332712a13..775b7b1e0 100644
--- a/system/gcc/340-gccgo-time64-stat.patch
+++ b/system/gcc/340-gccgo-time64-stat.patch
@@ -2,18 +2,14 @@ There are more than one st_{a,m,c}tim fields in struct stat on time64 machines.
Run the Go-isation on all of them.
---- gcc-8.3.0/libgo/mksysinfo.sh.old 2018-11-09 15:29:52.000000000 +0000
-+++ gcc-8.3.0/libgo/mksysinfo.sh 2019-12-23 00:18:54.129911814 +0000
-@@ -468,9 +468,9 @@
- -e 's/st_size/Size/' \
- -e 's/st_blksize/Blksize/' \
- -e 's/st_blocks/Blocks/' \
-- -e 's/st_atim/Atim/' \
-- -e 's/st_mtim/Mtim/' \
-- -e 's/st_ctim/Ctim/' \
-+ -e 's/st_atim/Atim/g' \
-+ -e 's/st_mtim/Mtim/g' \
-+ -e 's/st_ctim/Ctim/g' \
- -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \
- -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \
- -e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1StTimespec\2/g' \
+--- gcc-8.3.0/libgo/mksysinfo.sh 2020-12-23 22:27:49.162150557 +0000
++++ gcc-8.3.0/libgo/mksysinfo.sh 2020-12-23 22:41:34.500621493 +0000
+@@ -518,7 +518,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/system/gcc/APKBUILD b/system/gcc/APKBUILD
index 32de06be4..fba969dbe 100644
--- a/system/gcc/APKBUILD
+++ b/system/gcc/APKBUILD
@@ -138,6 +138,8 @@ fi
makedepends="$makedepends_build $makedepends_host"
source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
+ https://dev.sick.bike/dist/gccgo-backport-$pkgver.tar.gz
+ https://dev.sick.bike/dist/gofrontend-backport-$pkgver.tar.gz
0002-posix_memalign.patch
0008-s390x-muslldso.patch
@@ -176,7 +178,6 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
335-gccgo-signal-ppc32.patch
336-gccgo-mmap64.patch
337-gccgo-signal-sig34.patch
- 338-gccgo-syscall.patch
339-gccgo-errstr.patch
340-gccgo-time64-stat.patch
@@ -193,6 +194,15 @@ _gccdir="$srcdir"/gcc-$pkgver
_gcclibdir=/usr/lib/gcc/${CTARGET}/$pkgver
_gcclibexec=/usr/libexec/gcc/${CTARGET}/$pkgver
+unpack() {
+ default_unpack
+ for i in gcc/go/gofrontend libgo; do
+ rm -rf "$builddir/$i"
+ mv "$srcdir/gofrontend-backport-$pkgver/$i" \
+ "$builddir/${i%/*}"
+ done
+}
+
prepare() {
cd "$_gccdir"
@@ -542,6 +552,8 @@ gnat() {
}
sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz
+8a332eeb7fde645d64d24760e53654d77a379acc26fb12b9da595ab86dcfcd112ff848b39940b1118bc52f4faa6f827250ce9c56fd0e686d8ae8e0f53422455d gccgo-backport-8.3.0.tar.gz
+337b333d1fac1d1465463b2b5ae17bfcd9311f33a5e9c01c0f64eba4c5b0c58f3bb2e075bc1535cf8c5bd19b1e48976eb0914c7b01a164abc8560bb060e3ac11 gofrontend-backport-8.3.0.tar.gz
6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch
7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch
b8207c1be82b20fdad2596bb0a60469db52257456d0925bacf48b44899f4c6ece93c501347e1ffe92fd372c30f90d05a6d8d8078876abf4cf2deae3dbb1a1f58 0009-microblaze-pr65649.patch
@@ -572,11 +584,10 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
ef6ff46d571814ce2f6db549bfb9b9f5cc55d46085b197c36627a72e4f355fcbeb41d04fabd3029f3bc536fc48155fe3feab58a7a6ece9dcd19409ea44c17b0b 333-gccgo-signal-ppc64.patch
ab7a19d2702d232c9c1242fbdf9bd782e195d94104c0278e3b9ce435060a169094525ca53b615b3a9e62786db77bba836ecd495d58b544df474b13348432c200 334-gccgo-signal-shell.patch
e755072a3c71ada6cde354dd258fae029919e1116048068368d38411ca28a6ad8856702498d6667b0dcbb1d09fcb3fd66669aa79739a5e574a9cd490bd92ce90 335-gccgo-signal-ppc32.patch
-de0cc0f9356c9ee5ea7b0f954441b59115f4a8f8f63573d0c17b6537e6f37641cf137531b496fc192d38035c2c4ba8175d36cbd7da15cbfcf8dc18c049c0f111 336-gccgo-mmap64.patch
+066e8f40debbb9d6efe055e88c1a90a8be4b0d713ec5335066f74e2809d2b08c2b50aac7053a3d0ad01984af73ba741c701690c799e58e546317f32262121a0d 336-gccgo-mmap64.patch
c2916948b028e1e990e1953875b884561c0f8dd105c1ec03073795df9a47ec2c627cbc95ca0ec98ab9177bf2b7c8458bf3fd09f780fa6c301995846f6317e366 337-gccgo-signal-sig34.patch
-0bdf592ec8444c6e253f1a7626b4e618b2e18e6d0b5a4548f90903f9de80a7cf3ea536750c2743f436a05faa1e7b65e52a391da9732dce51c4b00e23853e5365 338-gccgo-syscall.patch
-b32d496a3a04c2357200b75dbf7f667fb57bf5af4f0c68926bc58f6600e4f23caa48aad2eaf073f1408168cacf27e8f11a6062c65bf5bb67458eedef698871d4 339-gccgo-errstr.patch
-4db4a00dff1d3cb3ecbc713659316782ac839478ff1fd7166cfa64a2c7cee0ba2a0d3fa23cb858af7d8f59a6ac2bdf40e63a45c307b89eefe2a4e888707f615b 340-gccgo-time64-stat.patch
+8554667424eded94dfc1d9d0f7a8016e897b22ecd1a2fb03720a4894ea50f26abbcd11c8cbc6d257f90ee5380f0c73e9f22f3f8b50d5dae861c41ff3047a3471 339-gccgo-errstr.patch
+3cf4dbadcb585cafa1e5f5c63c2da0baf25d8e54e5f781dde149c941b862859794ffccd02be2c26c16fcefe601c905c3bb1d86065ecfa4f0f328acc826d5c9f5 340-gccgo-time64-stat.patch
1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch
db8c4ab3eae7c01943a61e9e3e20af45d4f6d196184eee5b94068b212900ccdeecaf4fb4145983226954f64e7c989fcd13e0b506176d2b3e781c2e9dc8b5a5a8 disable-multiarch-ppc32.patch
67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch