Skip to content

Commit 866f2e1

Browse files
committed
community/go: force external link for ppc64le for now
This is a workaround for an upstream Go issues. Some tests fail as they also try to use internal link mode, since this is (hopefully) a temporary workaround just disable tests on ppc64le for now. See golang/go#51787 (comment)
1 parent d0d8d71 commit 866f2e1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

community/go/APKBUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ checkdepends="binutils-gold"
1515
subpackages="$pkgname-doc"
1616
source="https://go.dev/dl/go$pkgver.src.tar.gz
1717
allow-unshare-to-return-enosys.patch
18+
force-external-link-on-ppc64le.patch
1819
"
1920
case "$CARCH" in
2021
arm*|aarch64) depends="binutils-gold";;
@@ -118,6 +119,13 @@ case "$CARCH" in
118119
x86_64|s390x|aarch64) export GO_LDFLAGS=-buildmode=pie ;;
119120
esac
120121

122+
# Disable tests on ppc64 for now since they fail due to the
123+
# force-external-link-on-ppc64le.patch we employ currently.
124+
# See the patch description for details.
125+
case "$CARCH" in
126+
ppc64le) options="!check" ;;
127+
esac
128+
121129
prepare() {
122130
default_prepare
123131

@@ -198,4 +206,5 @@ package() {
198206
sha512sums="
199207
f10356df9099e4d027415be5c73bd2551f2f941a31feb21e1ccc03b7d8faa1844f0a639a508e990712e11ec335675e57504edb323fa1eee63e1d09b8523b3b0d go1.18.src.tar.gz
200208
6017caacf77c2911e9e882878fdaa2ed066b76b7e97b2ad776bc33d96b21cabc802966473946642c86a8f985c69adcc5e7ea61684f6d0dbacd468a6aad687229 allow-unshare-to-return-enosys.patch
209+
1ad16c8057c891689aa19dbc87efaf8ba6f9dc5592d178f32e441dc2da35647ae75dc1c00f765f7c244f0f486acc1e3db35d4b23533616c90937b2a6c0cd0d0a force-external-link-on-ppc64le.patch
201210
"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
See https://github.com/golang/go/issues/51787#issuecomment-1072700785
2+
3+
--- go.orig/src/cmd/link/internal/ld/config.go
4+
+++ go/src/cmd/link/internal/ld/config.go
5+
@@ -212,7 +212,7 @@
6+
// windows/arm64 internal linking is not implemented.
7+
return true, buildcfg.GOOS + "/" + buildcfg.GOARCH + " does not support internal cgo"
8+
}
9+
- if iscgo && ctxt.Arch == sys.ArchPPC64 {
10+
+ if iscgo && (ctxt.Arch == sys.ArchPPC64 || ctxt.Arch == sys.ArchPPC64LE) {
11+
// Big Endian PPC64 cgo internal linking is not implemented for aix or linux.
12+
return true, buildcfg.GOOS + " does not support internal cgo"
13+
}

0 commit comments

Comments
 (0)