Mail archive
alpine-aports

[alpine-aports] [PATCH] main/protobuf: fix build on mips{el} (-latomic)

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Mon, 26 Nov 2018 22:05:43 +0000

32-bit MIPS (until R6) lacks instructions to implement 64-bit atomic
operations so explicit linkage with libatomic is required.
---
 main/protobuf/APKBUILD | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/main/protobuf/APKBUILD b/main/protobuf/APKBUILD
index 6b4ee20ce6..62fc04e984 100644
--- a/main/protobuf/APKBUILD
+++ b/main/protobuf/APKBUILD
_at_@ -4,7 +4,7 @@ pkgname=protobuf
 _gemname=google-protobuf
 pkgver=3.6.1
 _tstver=1.8.0
-pkgrel=0
+pkgrel=1
 pkgdesc="Library for extensible, efficient structure packing"
 url="https://github.com/google/protobuf"
 arch="all"
_at_@ -34,6 +34,8 @@ prepare() {
 build() {
 	cd "$builddir"
 
+	case "$CARCH" in mips|mipsel) export LIBS="$LIBS -latomic";; esac
+
 	CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" \
 		./configure --prefix=/usr \
 			--sysconfdir=/etc \
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Nov 26 2018 - 22:05:43 UTC