From de6984edd5ce7fa2b2f365b5ae770507ef42022d Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 17 Feb 2020 13:13:49 +0800 Subject: [PATCH] Fixed bug #79255 (PHP cannot be compiled with enable JIT) --- NEWS | 1 + ext/opcache/config.m4 | 21 ++++++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index a41a74acc40..c484a95b8f2 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,7 @@ 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) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 5e61575d480..4289b438d52 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -42,19 +42,14 @@ 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" - 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* + case $host_alias in + *x86_64-*-darwin*) + DASM_FLAGS="-D X64APPLE=1 -D X64=1" + ;; + *x86_64*) + DASM_FLAGS="-D X64=1" + ;; + esac if test "$enable_zts" = "yes"; then DASM_FLAGS="$DASM_FLAGS -D ZTS=1"