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

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Do not remove -O0 in the middle of a flag
  Fix removal of optimization cflags in debug builds (#9647)
This commit is contained in:
Arnaud Le Blanc
2024-09-12 13:11:49 +02:00
3 changed files with 15 additions and 12 deletions

View File

@@ -860,10 +860,7 @@ if test "$PHP_GCOV" = "yes"; then
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/build/Makefile.gcov, $abs_srcdir)
dnl Remove all optimization flags from CFLAGS.
changequote({,})
CFLAGS=`echo "$CFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'`
CXXFLAGS=`echo "$CXXFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'`
changequote([,])
PHP_REMOVE_OPTIMIZATION_FLAGS
dnl Add the special gcc flags.
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
@@ -880,10 +877,7 @@ PHP_ARG_ENABLE([debug],
if test "$PHP_DEBUG" = "yes"; then
PHP_DEBUG=1
ZEND_DEBUG=yes
changequote({,})
CFLAGS=`echo "$CFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'`
CXXFLAGS=`echo "$CXXFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'`
changequote([,])
PHP_REMOVE_OPTIMIZATION_FLAGS
dnl Add -O0 only if GCC or ICC is used.
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
CFLAGS="$CFLAGS -O0"