mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix removal of optimization cflags in debug builds (#9647)
Discard known '-O' flags, including just '-O', but do not remove only '-O' in '-Ounknown'
This commit is contained in:
parent
c4d9a37e81
commit
182fee1447
2 changed files with 9 additions and 6 deletions
|
@ -116,8 +116,9 @@ 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'`
|
||||
dnl Discard known '-O...' flags, including just '-O', but do not remove only '-O' in '-Ounknown'
|
||||
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g'`
|
||||
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g'`
|
||||
changequote([,])
|
||||
dnl Add -O0 only if GCC or ICC is used.
|
||||
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue