From 881fe216181ead24f3ce8735b65a30d894ddd68f Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 15 Feb 2024 10:24:41 +0100 Subject: [PATCH 1/2] Disable JIT on Apple Silicon + ZTS See discussion in https://github.com/php/php-src/pull/13351. Closes GH-13396 --- .github/workflows/push.yml | 2 +- ext/opcache/config.m4 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 52a323c581488..83317c154e549 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -170,7 +170,7 @@ jobs: - name: ./configure uses: ./.github/actions/configure-macos with: - configurationParameters: --enable-debug --disable-zts + configurationParameters: --enable-debug --enable-zts - name: make run: |- export PATH="$(brew --prefix)/opt/bison/bin:$PATH" diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 4bab4f21bc532..c298d8915db88 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -42,6 +42,10 @@ if test "$PHP_OPCACHE" != "no"; then PHP_OPCACHE_JIT=no ;; esac + if test "$host_vendor" = "apple" -a "$host_cpu" = "aarch64" -a "$ZEND_ZTS" = "yes"; then + AC_MSG_WARN([JIT not supported on Apple Silicon with ZTS]) + PHP_OPCACHE_JIT=no + fi fi if test "$PHP_OPCACHE_JIT" = "yes" ; then From 8b99a2cb07be74ba0a48a50e7a08ad2ae3a5cc85 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 15 Feb 2024 12:43:29 +0100 Subject: [PATCH 2/2] Update ext/opcache/config.m4 Co-authored-by: Peter Kokot --- ext/opcache/config.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index c298d8915db88..708a821819606 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -42,7 +42,7 @@ if test "$PHP_OPCACHE" != "no"; then PHP_OPCACHE_JIT=no ;; esac - if test "$host_vendor" = "apple" -a "$host_cpu" = "aarch64" -a "$ZEND_ZTS" = "yes"; then + if test "$host_vendor" = "apple" && test "$host_cpu" = "aarch64" && test "$PHP_THREAD_SAFETY" = "yes"; then AC_MSG_WARN([JIT not supported on Apple Silicon with ZTS]) PHP_OPCACHE_JIT=no fi