Add -Wno-implicit-fallthrough conditionally. https://github.com/php/php-src/issues/13330 https://github.com/php/php-src/pull/13331 --- ext/opcache/config.m4.orig 2024-04-09 16:35:09.000000000 -0500 +++ ext/opcache/config.m4 2024-04-16 05:58:56.000000000 -0500 @@ -300,6 +300,8 @@ fi AC_MSG_RESULT([$have_shm_mmap_posix]) + AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [PHP_OPCACHE_CFLAGS="$PHP_OPCACHE_CFLAGS -Wno-implicit-fallthrough"],,[-Werror]) + PHP_NEW_EXTENSION(opcache, ZendAccelerator.c \ zend_accelerator_blacklist.c \ @@ -315,7 +317,7 @@ shared_alloc_mmap.c \ shared_alloc_posix.c \ $ZEND_JIT_SRC, - shared,,"-Wno-implicit-fallthrough -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1",,yes) + shared,,"$PHP_OPCACHE_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1",,yes) PHP_ADD_EXTENSION_DEP(opcache, pcre)