Skip to content

Commit cf8407a

Browse files
committed
Fixed bug #79255 (PHP cannot be compiled with enable JIT)
1 parent 7a8f180 commit cf8407a

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ PHP NEWS
4242

4343
- JIT:
4444
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)
45+
. Fixed bug #79255 (PHP cannot be compiled with enable JIT).
46+
(Laruence, Dmitry)
4547

4648
- LDAP:
4749
. Removed deprecated ldap_sort. (mcmic)

ext/opcache/config.m4

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,28 @@ if test "$PHP_OPCACHE" != "no"; then
4343
ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
4444

4545
dnl Find out which ABI we are using.
46-
echo 'int i;' > conftest.$ac_ext
47-
if AC_TRY_EVAL(ac_compile); then
48-
case `/usr/bin/file conftest.o` in
49-
*"Mach-O 64-bit"*)
46+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
47+
int main(void) {
48+
return sizeof(void*) == 4;
49+
}
50+
]])],[
51+
ac_cv_32bit_build=no
52+
],[
53+
ac_cv_32bit_build=yes
54+
],[
55+
ac_cv_32bit_build=no
56+
])
57+
58+
if test "$ac_cv_32bit_build" = "no"; then
59+
case $host_alias in
60+
*x86_64-*-darwin*)
5061
DASM_FLAGS="-D X64APPLE=1 -D X64=1"
5162
;;
52-
*64-bit*)
63+
*x86_64*)
5364
DASM_FLAGS="-D X64=1"
5465
;;
5566
esac
5667
fi
57-
rm -rf conftest*
5868

5969
if test "$enable_zts" = "yes"; then
6070
DASM_FLAGS="$DASM_FLAGS -D ZTS=1"

0 commit comments

Comments
 (0)