]> granicus.if.org Git - php/commitdiff
Implement handling for JIT recognition when cross compiling
authorAnatol Belski <ab@php.net>
Mon, 5 Nov 2018 00:15:09 +0000 (01:15 +0100)
committerAnatol Belski <ab@php.net>
Mon, 5 Nov 2018 00:15:09 +0000 (01:15 +0100)
ext/pcre/config0.m4

index 6b94bac3c9291743c582ce9c26ef5335126fefb6..b9542f0113063e8496ef6e8ce0ac288fae8a9159 100644 (file)
@@ -71,8 +71,16 @@ PHP_ARG_WITH(pcre-jit,,[  --with-pcre-jit         Enable PCRE JIT functionality
         AC_MSG_RESULT([no])
       ],
       [
-        dnl cross compilation might want to rely on arch names
-        AC_MSG_RESULT([no])
+        AC_CANONICAL_HOST
+        case $host_cpu in
+        arm*|i[34567]86|x86_64|mips*|powerpc*|sparc)
+          AC_MSG_RESULT([yes])
+          AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [])
+          ;;
+        *)
+          AC_MSG_RESULT([no])
+          ;;
+        esac
       ])
     fi