aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2021-04-19 11:28:42 +0200
committerAriadne Conill <ariadne@dereferenced.org>2021-04-19 17:39:27 +0000
commitb701adc3e580957907298781396c825247399baa (patch)
treec9dc3a1cf44658145762b99441ccbd0925420e8d
parent976f97057a2417237a9cbdd6f28b91269b4f82dd (diff)
downloadaports-b701adc3e580957907298781396c825247399baa.tar.gz
aports-b701adc3e580957907298781396c825247399baa.tar.bz2
aports-b701adc3e580957907298781396c825247399baa.tar.xz
main/gcc: use generic Errstr() implementation in libgo
Fixes #12593
-rw-r--r--main/gcc/0041-Use-generic-errstr.go-implementation-on-musl.patch45
-rw-r--r--main/gcc/APKBUILD6
2 files changed, 49 insertions, 2 deletions
diff --git a/main/gcc/0041-Use-generic-errstr.go-implementation-on-musl.patch b/main/gcc/0041-Use-generic-errstr.go-implementation-on-musl.patch
new file mode 100644
index 0000000000..afebb26cd4
--- /dev/null
+++ b/main/gcc/0041-Use-generic-errstr.go-implementation-on-musl.patch
@@ -0,0 +1,45 @@
+From ac361345ce5110d0551eb1a162594c2f9de66023 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Mon, 19 Apr 2021 07:21:41 +0200
+Subject: [PATCH] Use generic errstr.go implementation on musl
+
+glibc provides two version of strerror_r() depending on a feature test
+macro. The first is the XSI-compliant version which returns an int, the
+second is GNU-specific and returns a char pointer.
+
+Similarity, gcc's libgo provides two implementations of Errstr() both of
+which use strerror_r(). On Linux, it is assumed that the GNU-specific
+strerror_r version is used. However, musl only provides the
+XSI-compliant version of strerror_r. This patch enables the generic
+Errstr() implementation which also uses the XSI-compliant version of
+strerror_r.
+---
+ libgo/go/syscall/errstr.go | 1 -
+ libgo/go/syscall/errstr_glibc.go | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
+index 6c2441d364d..8f7c5538163 100644
+--- a/libgo/go/syscall/errstr.go
++++ b/libgo/go/syscall/errstr.go
+@@ -5,7 +5,6 @@
+ // license that can be found in the LICENSE file.
+
+ // +build !hurd
+-// +build !linux
+
+ package syscall
+
+diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go
+index 5b19e6f202d..8dc60172186 100644
+--- a/libgo/go/syscall/errstr_glibc.go
++++ b/libgo/go/syscall/errstr_glibc.go
+@@ -7,7 +7,7 @@
+ // 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
++// +build hurd !linux
+
+ package syscall
+
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 3eef4de740..b58d970f24 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -8,7 +8,7 @@ pkgver=10.3.1_git20210409
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname="$pkgname$_target"
-pkgrel=0
+pkgrel=1
pkgdesc="The GNU Compiler Collection"
url="https://gcc.gnu.org"
arch="all"
@@ -203,6 +203,7 @@ source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz
0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch
0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
+ 0041-Use-generic-errstr.go-implementation-on-musl.patch
"
# we build out-of-tree
@@ -689,4 +690,5 @@ af1aa70aafd9bb7416a86c407aa3227809b725748ab0a46a2437b950783545e781c3c974003b3c7e
674c828e93aa84cd07894bab320e410bb35ac469d7a1312d623af898b4ba82a1a513ed3037e5f9026e881c136717012af5ff5049a7586d664961e0a02795e094 0037-gcc-go-link-to-libucontext.patch
501e01642183040992ea29d3dc30c918960a83ef386dc6c0f21863b1d4367983bde0ec6c955a8efac5fb52a53ce6dd2670dbfe8b32c72875fcbe6fe0ad92501e 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
ca264938dba3ec0086a463127e7f14932a556c6b54cb36638a3d974be83d0d67cf6707e9230dcf4d527962de1c0060a6084b2346f8d374ee5c851828138ded4c 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch
-8e0e203f8c66a496151db561e88612f7ce9295a420f8436e43a4ca1ae330bdbe7aeecfe6616f7331cb7913f9cc9ee1f83c94f798515fb91a4037f8b276d10ece 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch"
+8e0e203f8c66a496151db561e88612f7ce9295a420f8436e43a4ca1ae330bdbe7aeecfe6616f7331cb7913f9cc9ee1f83c94f798515fb91a4037f8b276d10ece 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
+f5b349fed2d513cfe21438ec317e61f78222f9b83d2d62fc4052b44072e3af65fd51e6c3b533d9332e9e8e942083b10c7daa97496cc02e9691f306c4f966ba21 0041-Use-generic-errstr.go-implementation-on-musl.patch"