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> 16Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 17[Bernd: rebased for 8.1.7 & 8.3.3] 18--- 19 ext/opcache/config.m4 | 4 ---- 20 1 file changed, 4 deletions(-) 21 22diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 23index 5492fd92..10c150ff 100644 24--- a/ext/opcache/config.m4 25+++ b/ext/opcache/config.m4 26@@ -315,10 +315,6 @@ int main() { 27 28 PHP_ADD_EXTENSION_DEP(opcache, pcre) 29 30- if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then 31- AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.]) 32- fi 33- 34 if test "$PHP_OPCACHE_JIT" = "yes"; then 35 PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1) 36 PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag) 37-- 382.31.1 39 40