diff --git a/cross/gcc-aarch64/0041-Use-generic-errstr.go-implementation-on-musl.patch b/cross/gcc-aarch64/0041-Use-generic-errstr.go-implementation-on-musl.patch new file mode 100644 index 000000000..afebb26cd --- /dev/null +++ b/cross/gcc-aarch64/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?= +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/cross/gcc-aarch64/APKBUILD b/cross/gcc-aarch64/APKBUILD index 84427e467..d2f7169a5 100644 --- a/cross/gcc-aarch64/APKBUILD +++ b/cross/gcc-aarch64/APKBUILD @@ -31,7 +31,7 @@ pkgver=10.3.1_git20210409 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-aarch64 -pkgrel=0 +pkgrel=1 pkgdesc="Stage2 cross-compiler for aarch64" url="https://gcc.gnu.org" arch="x86_64" @@ -225,6 +225,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 @@ -708,4 +709,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" diff --git a/cross/gcc-armhf/0041-Use-generic-errstr.go-implementation-on-musl.patch b/cross/gcc-armhf/0041-Use-generic-errstr.go-implementation-on-musl.patch new file mode 100644 index 000000000..afebb26cd --- /dev/null +++ b/cross/gcc-armhf/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?= +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/cross/gcc-armhf/APKBUILD b/cross/gcc-armhf/APKBUILD index a22ba8b04..7b9d31384 100644 --- a/cross/gcc-armhf/APKBUILD +++ b/cross/gcc-armhf/APKBUILD @@ -31,7 +31,7 @@ pkgver=10.3.1_git20210409 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-armhf -pkgrel=0 +pkgrel=1 pkgdesc="Stage2 cross-compiler for armhf" url="https://gcc.gnu.org" arch="x86_64" @@ -225,6 +225,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 @@ -708,4 +709,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" diff --git a/cross/gcc-armv7/0041-Use-generic-errstr.go-implementation-on-musl.patch b/cross/gcc-armv7/0041-Use-generic-errstr.go-implementation-on-musl.patch new file mode 100644 index 000000000..afebb26cd --- /dev/null +++ b/cross/gcc-armv7/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?= +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/cross/gcc-armv7/APKBUILD b/cross/gcc-armv7/APKBUILD index c6bf0aece..a90f053d7 100644 --- a/cross/gcc-armv7/APKBUILD +++ b/cross/gcc-armv7/APKBUILD @@ -31,7 +31,7 @@ pkgver=10.3.1_git20210409 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-armv7 -pkgrel=0 +pkgrel=1 pkgdesc="Stage2 cross-compiler for armv7" url="https://gcc.gnu.org" arch="x86_64" @@ -225,6 +225,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 @@ -708,4 +709,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"