]> granicus.if.org Git - php/commitdiff
Revert "Fixed bug #79255 (PHP cannot be compiled with enable JIT)"
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 17 Feb 2020 08:34:56 +0000 (09:34 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 17 Feb 2020 08:34:56 +0000 (09:34 +0100)
This reverts commit de6984edd5ce7fa2b2f365b5ae770507ef42022d.

Reverting to unbreak 32-bit CI.

NEWS
ext/opcache/config.m4

diff --git a/NEWS b/NEWS
index c484a95b8f241e4d552792907ac2f8816b55f5ed..a41a74acc40a0c3ada91fd3973844b9bc30e0520 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -42,7 +42,6 @@ PHP                                                                        NEWS
 
 - JIT:
   . Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)
-  . Fixed bug #79255 (PHP cannot be compiled with enable JIT). (Laruence)
 
 - LDAP:
   . Removed deprecated ldap_sort. (mcmic)
index 4289b438d52f726bb32c0308d542a74633b6a27a..5e61575d480709d1ea0b3b3b8a1f08e864aa3b6e 100644 (file)
@@ -42,14 +42,19 @@ if test "$PHP_OPCACHE" != "no"; then
     AC_DEFINE(HAVE_JIT, 1, [Define to enable JIT])
     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
 
-    case $host_alias in
-      *x86_64-*-darwin*)
-        DASM_FLAGS="-D X64APPLE=1 -D X64=1"
-      ;;
-      *x86_64*)
-        DASM_FLAGS="-D X64=1"
-      ;;
-    esac
+    dnl Find out which ABI we are using.
+    echo 'int i;' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.o` in
+        *"Mach-O 64-bit"*)
+          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+        ;;
+        *64-bit*)
+          DASM_FLAGS="-D X64=1"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
 
     if test "$enable_zts" = "yes"; then
       DASM_FLAGS="$DASM_FLAGS -D ZTS=1"