mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Autotools: Update ax_check_compile_flag.m4 to serial 11 (#19127)
```sh wget -O build/ax_check_compile_flag.m4 \ https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/plain/m4/ax_check_compile_flag.m4 ``` New version of AX_CHECK_COMPILE_FLAG macro now adds the -Werror flag automatically, if GNU-compatible compiler is detected.
This commit is contained in:
parent
7bf79ab666
commit
f64c6248b5
7 changed files with 25 additions and 26 deletions
21
Zend/Zend.m4
21
Zend/Zend.m4
|
@ -193,28 +193,21 @@ AS_VAR_IF([GCC], [yes],
|
|||
|
||||
dnl Check if compiler supports -Wno-clobbered (only GCC).
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-clobbered],
|
||||
[CFLAGS="-Wno-clobbered $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-Wno-clobbered $CFLAGS"])
|
||||
dnl Check for support for implicit fallthrough level 1, also add after previous
|
||||
dnl CFLAGS as level 3 is enabled in -Wextra.
|
||||
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough=1],
|
||||
[CFLAGS="$CFLAGS -Wimplicit-fallthrough=1"],,
|
||||
[-Werror])
|
||||
[CFLAGS="$CFLAGS -Wimplicit-fallthrough=1"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond],
|
||||
[CFLAGS="-Wduplicated-cond $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-Wduplicated-cond $CFLAGS"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wlogical-op],
|
||||
[CFLAGS="-Wlogical-op $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-Wlogical-op $CFLAGS"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-truncation],
|
||||
[CFLAGS="-Wformat-truncation $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-Wformat-truncation $CFLAGS"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes],
|
||||
[CFLAGS="-Wstrict-prototypes $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-Wstrict-prototypes $CFLAGS"])
|
||||
AX_CHECK_COMPILE_FLAG([-fno-common],
|
||||
[CFLAGS="-fno-common $CFLAGS"],,
|
||||
[-Werror])
|
||||
[CFLAGS="-fno-common $CFLAGS"])
|
||||
|
||||
ZEND_CHECK_ALIGNMENT
|
||||
ZEND_CHECK_SIGNALS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue