Subject: [alpine-aports] [PATCH] main/pcre: fix JIT options on mips*

From: alpine-mips-patches <[email-masked]>
Date: Wed, 6 Dec 2018 06:36:01 +0000

1) Disable use of CFC1 (FPU instruction) on all soft-float mips*.
2) Enable MIPS32 ISA (default is MIPS III) on 32-bit mips{el}.
---
 main/pcre/APKBUILD | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/main/pcre/APKBUILD b/main/pcre/APKBUILD
index 58532b594e..da65eef6bb 100644
--- a/main/pcre/APKBUILD
+++ b/main/pcre/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=pcre
 pkgver=8.42
-pkgrel=0
+pkgrel=1
 pkgdesc="Perl-compatible regular expression library"
 url="http://pcre.sourceforge.net"
 arch="all"
@@ -25,7 +25,14 @@ builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
 	cd "$builddir"
-	[ "$CARCH" = "s390x" ] && _enable_jit="" || _enable_jit="--enable-jit"
+
+	local _enable_jit="--enable-jit"
+	case "$CARCH" in
+	mips64*) export CPPFLAGS="$CPPFLAGS -DSLJIT_IS_FPU_AVAILABLE=0";;
+	mips*) export CPPFLAGS="$CPPFLAGS -DSLJIT_IS_FPU_AVAILABLE=0 -DSLJIT_MIPS_R1=1";;
+	s390x) _enable_jit="";;
+	esac
+
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
-- 
2.19.2

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