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

12345678910111213141516171819202122232425262728293031323334353637
  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. ---
  15. ext/opcache/config.m4 | 4 ----
  16. 1 file changed, 4 deletions(-)
  17. diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
  18. index 5492fd92..10c150ff 100644
  19. --- a/ext/opcache/config.m4
  20. +++ b/ext/opcache/config.m4
  21. @@ -339,10 +339,6 @@ int main() {
  22. PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
  23. PHP_ADD_EXTENSION_DEP(opcache, pcre)
  24. - if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
  25. - AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
  26. - fi
  27. -
  28. if test "$PHP_OPCACHE_JIT" = "yes"; then
  29. PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
  30. PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  31. --
  32. 2.31.1