1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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)
This commit is contained in:
Peter Kokot
2024-06-08 20:04:21 +02:00
parent fd2d869642
commit 743d1fd2a2
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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)