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-10 00:53:50.000000000 -0500 +++ ext/opcache/config.m4 2024-04-16 06:01:14.000000000 -0500 @@ -313,6 +313,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 \ @@ -328,7 +330,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)