Subject: [alpine-aports] [PATCH] community/libcoro: fix build on armv7

From: Milan P. Stanić <[email-masked]>
Date: Thu, 3 Jan 2019 19:06:36 +0100

use CORO_SJLJ build C flag on all architectures
---
 community/libcoro/APKBUILD | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/community/libcoro/APKBUILD b/community/libcoro/APKBUILD
index cdd5562aa7..0e0bd4307b 100644
--- a/community/libcoro/APKBUILD
+++ b/community/libcoro/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Jakub Jirutka <[email-masked]>
 pkgname=libcoro
 pkgver=6.513
-pkgrel=0
+pkgrel=1
 pkgdesc="Coroutines (cooperative multitasking) in a portable fashion implemented in C"
 url="http://software.schmorp.de/pkg/libcoro.html"
 arch="all"
@@ -42,11 +42,7 @@ prepare() {
 build() {
 	cd "$builddir"
 
-	CFLAGS="-fPIC -pedantic -Wall"
-	case "$CARCH" in
-		x86* | armv7*) CFLAGS="$CFLAGS -DCORO_ASM";;
-		*) CFLAGS="$CFLAGS -DCORO_SJLJ";;
-	esac
+	CFLAGS="-DCORO_SJLJ -fPIC -pedantic -Wall"
 
 	# Build shared lib.
 	$CC $CFLAGS -O3 -c coro.c
-- 
2.18.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Timo Teras <[email-masked]>
Date: Fri, 4 Jan 2019 08:24:40 +0200

Hi,

We also have now main/libucontext for the makecontext() support. Would
it make sense to use CORO_UCONTEXT + libucontext; or is the CORO_SJLJ
more favorable?

Timo

On Thu,  3 Jan 2019 19:06:36 +0100
Milan P. Stanić <[email-masked]> wrote:

>  pkgdesc="Coroutines (cooperative multitasking) in a portable fashion
> implemented in C" url="http://software.schmorp.de/pkg/libcoro.html"
>  arch="all"

---

---

From: "Milan P. Stanic" <[email-masked]>
Date: Fri, 4 Jan 2019 11:43:47 +0100

> it make sense to use CORO_UCONTEXT + libucontext; or is the CORO_SJLJ

With -DCORO_UCONTEXT it doesn't build test.c
This test.c is taken from some github repo and is not in the upstream
CVS and to me seems as not needed in Alpine.

Without this file libcoro APKBUILD work just fine without needs for any
patch. I changed CFLAGS only to pass 'abuild check'.
If the test must be done there is conftest.c which could be tried
instead of the test.c

BTW, only one package, testing/tarantool, depends on libcoro.
Maybe libcoro could be moved to testing?
And, there is a newer version of libcoro on upstream site, but not sure
if it needs update in Alpine repo.

---