summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/pcre/patches/README3
-rw-r--r--src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch18
-rw-r--r--src/3rdparty/pcre/sljit/sljitConfigInternal.h7
3 files changed, 28 insertions, 0 deletions
diff --git a/src/3rdparty/pcre/patches/README b/src/3rdparty/pcre/patches/README
new file mode 100644
index 0000000000..1d2bc389dd
--- /dev/null
+++ b/src/3rdparty/pcre/patches/README
@@ -0,0 +1,3 @@
+These patches are landed in upstream PCRE (they're marked with
+their SVN revision number). When upgrading PCRE remember check
+if the version you're upgrading to already contains them or not.
diff --git a/src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch b/src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch
new file mode 100644
index 0000000000..41699d4882
--- /dev/null
+++ b/src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch
@@ -0,0 +1,18 @@
+Index: sljit/sljitConfigInternal.h
+===================================================================
+--- sljit/sljitConfigInternal.h (revision 1339)
++++ sljit/sljitConfigInternal.h (working copy)
+@@ -221,6 +221,13 @@
+ #define SLJIT_CACHE_FLUSH(from, to) \
+ sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
+
++#elif defined __ANDROID__
++
++/* Android lacks __clear_cache; instead, cacheflush should be used. */
++
++#define SLJIT_CACHE_FLUSH(from, to) \
++ cacheflush((long)(from), (long)(to), 0)
++
+ #elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+
+ /* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
diff --git a/src/3rdparty/pcre/sljit/sljitConfigInternal.h b/src/3rdparty/pcre/sljit/sljitConfigInternal.h
index 2b6616ef66..bc945fbcab 100644
--- a/src/3rdparty/pcre/sljit/sljitConfigInternal.h
+++ b/src/3rdparty/pcre/sljit/sljitConfigInternal.h
@@ -217,6 +217,13 @@
#define SLJIT_CACHE_FLUSH(from, to) \
sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
+#elif defined __ANDROID__
+
+/* Android lacks __clear_cache; instead, cacheflush should be used. */
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ cacheflush((long)(from), (long)(to), 0)
+
#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */