Skip to content

Commit 5c1cf76

Browse files
committed
Prepend compiler warning flags to CFLAG instead to append them
Credit to @bwoebi for the idea Closes GH-6057
1 parent 48e31be commit 5c1cf76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/Zend.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ else
212212
AC_DEFINE(ZEND_DEBUG,0,[ ])
213213
fi
214214
215-
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare"
215+
test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare $CFLAGS"
216216
dnl Check if compiler supports -Wno-clobbered (only GCC)
217-
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="$CFLAGS -Wno-clobbered", , [-Werror])
217+
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="-Wno-clobbered $CFLAGS", , [-Werror])
218218
219219
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
220220

0 commit comments

Comments
 (0)