mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
MFH: fix build with Sun compiler, which doesn't support -O0
This commit is contained in:
parent
44a3cad930
commit
ebef6661df
2 changed files with 22 additions and 2 deletions
16
acinclude.m4
16
acinclude.m4
|
@ -2574,3 +2574,19 @@ ifelse([$1],[],:,[$1])
|
||||||
ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
|
ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl PHP_DETECT_ICC
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([PHP_DETECT_ICC],
|
||||||
|
[
|
||||||
|
ICC="no"
|
||||||
|
AC_MSG_CHECKING([for icc])
|
||||||
|
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
|
||||||
|
ICC="no"
|
||||||
|
AC_MSG_RESULT([no]),
|
||||||
|
ICC="yes"
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,7 @@ dnl Checks for programs.
|
||||||
dnl -------------------------------------------------------------------------
|
dnl -------------------------------------------------------------------------
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
PHP_DETECT_ICC
|
||||||
AC_PROG_CC_C_O
|
AC_PROG_CC_C_O
|
||||||
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
|
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
|
||||||
dnl AC_PROG_CC_STDC
|
dnl AC_PROG_CC_STDC
|
||||||
|
@ -686,8 +687,11 @@ if test "$PHP_DEBUG" = "yes"; then
|
||||||
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
||||||
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
||||||
changequote([,])
|
changequote([,])
|
||||||
|
dnl add -O0 only if GCC or ICC is used
|
||||||
|
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
|
||||||
CFLAGS="$CFLAGS -O0"
|
CFLAGS="$CFLAGS -O0"
|
||||||
CXXFLAGS="$CXXFLAGS -O0"
|
CXXFLAGS="$CXXFLAGS -O0"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
PHP_DEBUG=0
|
PHP_DEBUG=0
|
||||||
ZEND_DEBUG=no
|
ZEND_DEBUG=no
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue