From 743d1fd2a2016739c9475ae5469e5df81eec6d0a Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 8 Jun 2024 20:04:21 +0200 Subject: [PATCH] Sync -Wno-implicit-fallthrough This is a sync of the https://github.com/php/php-src/pull/6252 after few years: - ext/date: pending recheck in GH-14187 - ext/hash: warning happens only on 32-bit build in ext/hash/sha3/generic32lc/KeccakP-1600-inplace32BI.c - ext/opcache: IR JIT doesn't seem to have this issue - ext/pcre remains disabled due to pcre2lib/sljit/sljitNativeARM_64.c (should be rechecked and fixed upstream) --- ext/hash/config.m4 | 5 +++-- ext/opcache/config.m4 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/hash/config.m4 b/ext/hash/config.m4 index f87d00bf86e..c9cbd1f5c5d 100644 --- a/ext/hash/config.m4 +++ b/ext/hash/config.m4 @@ -19,14 +19,15 @@ else AC_MSG_RESULT([no]) SHA3_DIR="sha3/generic32lc" SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c" + dnl Add -Wno-implicit-fallthrough flag as it happens on 32 bit builds + PHP_HASH_CFLAGS="-Wno-implicit-fallthrough" ],[ AC_MSG_RESULT([yes]) SHA3_DIR="sha3/generic64lc" SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c" ]) EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c hash_sha3.c" - dnl Add -Wno-implicit-fallthrough flag as it happens on 32 bit builds - PHP_HASH_CFLAGS="-Wno-implicit-fallthrough -I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" + PHP_HASH_CFLAGS="$PHP_HASH_CFLAGS -I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" PHP_ADD_BUILD_DIR(ext/hash/$SHA3_DIR, 1) fi diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 2d8e6bf8e02..bef360e7c3a 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -337,7 +337,7 @@ int main(void) { shared_alloc_mmap.c \ shared_alloc_posix.c \ $ZEND_JIT_SRC, - shared,,"-Wno-implicit-fallthrough -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes) + shared,,"-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes) PHP_ADD_EXTENSION_DEP(opcache, pcre)