0005-allow-opcache-cross-compiling.patch 1.3 KB

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