From b8139e15d0bc5415a84f1ac1551752d70baa50b2 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 9 Aug 2024 00:18:43 +0200 Subject: [PATCH] Autotools: Remove too basic optimization flag cleanup The optimization flags are removed in configure.ac when using --enable-debug. When using --enable-debug-assertions the optimization flags shouldn't ideally 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. --- Zend/Zend.m4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 66880aab2314f..4c384e4109f41 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -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 || DEBUG_CFLAGS="-g" - if test "$CFLAGS" = "-g -O2"; then - CFLAGS=-g - fi ], [AC_DEFINE([ZEND_DEBUG], [0])]) test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare $CFLAGS"