1From 9bb316c41a69935ee2072626467241889594bed4 Mon Sep 17 00:00:00 2001 2From: Adam Duskett <aduskett@gmail.com> 3Date: Mon, 28 Jun 2021 11:12:36 -0700 4Subject: [PATCH] allow opcache cross-compiling 5 6Remove the check at the end of ext/opcache/config.m4 that prevents opcache from 7being enabled in a cross-compiled environment. We pass the following as a 8CFLAGS when opcache is enabled: 9 -DHAVE_SHM_IPC 10 -DHAVE_SHM_MMAP_ANON 11 -DHAVE_SHM_MMAP_ZERO 12 -DHAVE_SHM_MMAP_POSIX 13 -DHAVE_SHM_MMAP_FILE 14 15Signed-off-by: Adam Duskett <aduskett@gmail.com> 16--- 17 ext/opcache/config.m4 | 4 ---- 18 1 file changed, 4 deletions(-) 19 20diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 21index 5492fd92..10c150ff 100644 22--- a/ext/opcache/config.m4 23+++ b/ext/opcache/config.m4 24@@ -339,10 +339,6 @@ int main() { 25 PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1) 26 PHP_ADD_EXTENSION_DEP(opcache, pcre) 27 28- if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then 29- AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.]) 30- fi 31- 32 if test "$PHP_OPCACHE_JIT" = "yes"; then 33 PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1) 34 PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag) 35-- 362.31.1 37 38