Skip to content

Commit a9f3e3c

Browse files
remicolletarnaud-lb
authored andcommitted
Fix GH-19298 missing libraries for opcache
In the absence of `PHP_ARG_WITH([opcache],` the value of ext_shared is not initialized while processing directives of ext/opcache/config.m4, causing PHP_EVAL_LIBLINE() to add libs to OPCACHE_SHARED_LIBADD instead of LIBS. Closes GH-19301
1 parent 16b2fc4 commit a9f3e3c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.5.0beta1
44

5+
- Opcache:
6+
. Fixed bug GH-19301 (opcache build failure). (Remi)
57

68
31 Jul 2025, PHP 8.5.0alpha3
79

ext/opcache/config.m4

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
8585
AS_VAR_IF([PHP_CAPSTONE], [yes],
8686
[PKG_CHECK_MODULES([CAPSTONE], [capstone >= 3.0.0], [
8787
AC_DEFINE([HAVE_CAPSTONE], [1], [Define to 1 if Capstone is available.])
88-
PHP_EVAL_LIBLINE([$CAPSTONE_LIBS], [OPCACHE_SHARED_LIBADD])
88+
PHP_EVAL_LIBLINE([$CAPSTONE_LIBS])
8989
PHP_EVAL_INCLINE([$CAPSTONE_CFLAGS])
9090
ZEND_JIT_SRC="$ZEND_JIT_SRC jit/ir/ir_disasm.c"
9191
])])
@@ -318,7 +318,7 @@ AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [
318318
AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
319319
[Define to 1 if you have the POSIX mmap() SHM support.])
320320
AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [],
321-
[PHP_EVAL_LIBLINE([$ac_cv_search_shm_open], [OPCACHE_SHARED_LIBADD])])
321+
[PHP_EVAL_LIBLINE([$ac_cv_search_shm_open])])
322322
])
323323

324324
PHP_NEW_EXTENSION([opcache], m4_normalize([
@@ -361,4 +361,3 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
361361
])
362362
PHP_ADD_MAKEFILE_FRAGMENT([$ext_srcdir/jit/Makefile.frag])
363363
])
364-
PHP_SUBST([OPCACHE_SHARED_LIBADD])

0 commit comments

Comments
 (0)