Autotools: Remove too basic optimization flag cleanup

The optimization flags are removed in configure.ac when using the
'--enable-debug' configure option (which also adds the '-O0'). When
using '--enable-debug-assertions' option, the optimization flags ideally
shouldn't be removed and this case never actually happen because the
CFLAGS at this point in ZEND_INIT contain all sorts of other flags also,
so it's redundant as it never gets executed.

Closes GH-15305
This commit is contained in:
Peter Kokot 2024-08-09 13:56:08 +02:00
parent 46ee0fb304
commit d7a8a04eb9
No known key found for this signature in database
GPG Key ID: A94800907AA79B36

View File

@ -177,9 +177,6 @@ AH_TEMPLATE([ZEND_DEBUG],
AS_VAR_IF([ZEND_DEBUG], [yes], [
AC_DEFINE([ZEND_DEBUG], [1])
echo " $CFLAGS" | grep ' -g' >/dev/null || CFLAGS="$CFLAGS -g"
if test "$CFLAGS" = "-g -O2"; then
CFLAGS=-g
fi
], [AC_DEFINE([ZEND_DEBUG], [0])])
AS_VAR_IF([GCC], [yes],