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
This commit is contained in:
Remi Collet 2025-07-30 09:42:02 +02:00 committed by Arnaud Le Blanc
parent 16b2fc41a3
commit a9f3e3c44e
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

2
NEWS
View file

@ -2,6 +2,8 @@ PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.5.0beta1 ?? ??? ????, PHP 8.5.0beta1
- Opcache:
. Fixed bug GH-19301 (opcache build failure). (Remi)
31 Jul 2025, PHP 8.5.0alpha3 31 Jul 2025, PHP 8.5.0alpha3

View file

@ -85,7 +85,7 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
AS_VAR_IF([PHP_CAPSTONE], [yes], AS_VAR_IF([PHP_CAPSTONE], [yes],
[PKG_CHECK_MODULES([CAPSTONE], [capstone >= 3.0.0], [ [PKG_CHECK_MODULES([CAPSTONE], [capstone >= 3.0.0], [
AC_DEFINE([HAVE_CAPSTONE], [1], [Define to 1 if Capstone is available.]) AC_DEFINE([HAVE_CAPSTONE], [1], [Define to 1 if Capstone is available.])
PHP_EVAL_LIBLINE([$CAPSTONE_LIBS], [OPCACHE_SHARED_LIBADD]) PHP_EVAL_LIBLINE([$CAPSTONE_LIBS])
PHP_EVAL_INCLINE([$CAPSTONE_CFLAGS]) PHP_EVAL_INCLINE([$CAPSTONE_CFLAGS])
ZEND_JIT_SRC="$ZEND_JIT_SRC jit/ir/ir_disasm.c" ZEND_JIT_SRC="$ZEND_JIT_SRC jit/ir/ir_disasm.c"
])]) ])])
@ -318,7 +318,7 @@ AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [
AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1], AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
[Define to 1 if you have the POSIX mmap() SHM support.]) [Define to 1 if you have the POSIX mmap() SHM support.])
AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [], AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [],
[PHP_EVAL_LIBLINE([$ac_cv_search_shm_open], [OPCACHE_SHARED_LIBADD])]) [PHP_EVAL_LIBLINE([$ac_cv_search_shm_open])])
]) ])
PHP_NEW_EXTENSION([opcache], m4_normalize([ PHP_NEW_EXTENSION([opcache], m4_normalize([
@ -361,4 +361,3 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
]) ])
PHP_ADD_MAKEFILE_FRAGMENT([$ext_srcdir/jit/Makefile.frag]) PHP_ADD_MAKEFILE_FRAGMENT([$ext_srcdir/jit/Makefile.frag])
]) ])
PHP_SUBST([OPCACHE_SHARED_LIBADD])