summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-13 01:25:14 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-13 01:25:14 +0000
commit5d5a8835844801be442de1332ef81052544949ef (patch)
tree86d0ef792326e9c1a1513de86f6a1a9bd71b691d
parent02a2bd307242bf8520133412db3fdcc8d1062943 (diff)
downloadpackages-5d5a8835844801be442de1332ef81052544949ef.tar.gz
packages-5d5a8835844801be442de1332ef81052544949ef.tar.bz2
packages-5d5a8835844801be442de1332ef81052544949ef.tar.xz
packages-5d5a8835844801be442de1332ef81052544949ef.zip
system/pcre: Add JIT support for 64-bit PowerPC
-rw-r--r--system/pcre/APKBUILD9
-rw-r--r--system/pcre/ppc64-elfv2-fix.patch25
2 files changed, 31 insertions, 3 deletions
diff --git a/system/pcre/APKBUILD b/system/pcre/APKBUILD
index f58826716..eb2d468a9 100644
--- a/system/pcre/APKBUILD
+++ b/system/pcre/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=pcre
pkgver=8.42
-pkgrel=0
+pkgrel=1
pkgdesc="Perl-compatible regular expression library"
url="http://pcre.sourceforge.net"
arch="all"
@@ -13,6 +13,7 @@ checkdepends="paxmark"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools
libpcrecpp libpcre16 libpcre32"
source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2
+ ppc64-elfv2-fix.patch
"
# secfixes:
@@ -25,7 +26,8 @@ builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
- ([ "$CARCH" = "s390x" ] || [ "$CARCH" = "ppc64" ]) && _enable_jit="" || _enable_jit="--enable-jit"
+ local _enable_jit="--enable-jit"
+ [ "$CARCH" = "s390x" ] && _enable_jit=""
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -87,4 +89,5 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-sha512sums="b47b923108f6ee0c31409b79d0888314271b482a22590e164d02f21d2112fba22dd0342c24f9ba0f5fcc5b8c65550bad08c476e30a2fc79b34ecf4601ed82f3d pcre-8.42.tar.bz2"
+sha512sums="b47b923108f6ee0c31409b79d0888314271b482a22590e164d02f21d2112fba22dd0342c24f9ba0f5fcc5b8c65550bad08c476e30a2fc79b34ecf4601ed82f3d pcre-8.42.tar.bz2
+61f06b2fb1d1d0d512056da4b8eb4905948b45a26ee177b0bcc6d25a75ffbdaff29c4b52ec461a7287b4f47ae20dbec31382188934e855c960f5877c31948a4b ppc64-elfv2-fix.patch"
diff --git a/system/pcre/ppc64-elfv2-fix.patch b/system/pcre/ppc64-elfv2-fix.patch
new file mode 100644
index 000000000..040f93ee9
--- /dev/null
+++ b/system/pcre/ppc64-elfv2-fix.patch
@@ -0,0 +1,25 @@
+diff -Naur pcre-8.42-original/sljit/sljitConfigInternal.h pcre-8.42/sljit/sljitConfigInternal.h
+--- pcre-8.42-original/sljit/sljitConfigInternal.h 2018-03-13 16:15:23.000000000 +0000
++++ pcre-8.42/sljit/sljitConfigInternal.h 2018-09-13 01:16:46.640000000 +0000
+@@ -530,7 +530,7 @@
+ #endif /* !SLJIT_FUNC */
+
+ #ifndef SLJIT_INDIRECT_CALL
+-#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)) \
++#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && ((defined _CALL_ELF && _CALL_ELF == 1) || (!defined _CALL_ELF))) \
+ || ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && defined _AIX)
+ /* It seems certain ppc compilers use an indirect addressing for functions
+ which makes things complicated. */
+diff -Naur pcre-8.42-original/sljit/sljitNativePPC_common.c pcre-8.42/sljit/sljitNativePPC_common.c
+--- pcre-8.42-original/sljit/sljitNativePPC_common.c 2018-01-08 10:25:56.000000000 +0000
++++ pcre-8.42/sljit/sljitNativePPC_common.c 2018-09-13 01:21:00.360000000 +0000
+@@ -42,7 +42,8 @@
+ #include <sys/cache.h>
+ #endif
+
+-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
++#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN) \
++ || (defined _CALL_ELF && _CALL_ELF == 2)
+ #define SLJIT_PASS_ENTRY_ADDR_TO_CALL 1
+ #endif
+