From: Jani Taskinen Date: Sat, 9 May 2009 20:36:35 +0000 (+0000) Subject: MFH: Add support for Sun CC X-Git-Tag: php-5.2.10RC1~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84208a67406e1a591693593663c018e4833e9933;p=php MFH: Add support for Sun CC --- diff --git a/NEWS b/NEWS index 9ee859c12e..8936616fc1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS, and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas) +- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra) - Fixed memory corruptions while reading properties of zip files. (Ilia) - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian) diff --git a/configure.in b/configure.in index ac6135bfc2..1117d23812 100644 --- a/configure.in +++ b/configure.in @@ -140,8 +140,9 @@ esac dnl Checks for programs. dnl ------------------------------------------------------------------------- -AC_PROG_CC +AC_PROG_CC([cc gcc]) PHP_DETECT_ICC +PHP_DETECT_SUNCC AC_PROG_CC_C_O dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf dnl AC_PROG_CC_STDC @@ -187,6 +188,10 @@ case $host_cpu in CFLAGS="$CFLAGS -ieee" fi ;; + sparc*) + if test "$SUNCC" = "yes"; then + CFLAGS="$CFLAGS -xmemalign=8s" + fi esac case $host_alias in @@ -731,6 +736,15 @@ if test "$PHP_GCOV" = "yes"; then dnl Add the special gcc flags CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage" + if test "$SUNCC" = "yes"; then + if test -n "$auto_cflags"; then + CFLAGS="-g" + CXXFLAGS="-g" + else + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CFLAGS -g" + fi + fi fi PHP_ARG_ENABLE(debug, whether to include debugging symbols, diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index ba668c8893..bf40948eed 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -17,11 +17,15 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[ test "[$]$1" = "no" && $1=yes ])dnl dnl + +test -z "$CFLAGS" && auto_cflags=1 + abs_srcdir=`(cd $srcdir && pwd)` abs_builddir=`pwd` -AC_PROG_CC +AC_PROG_CC([cc gcc]) PHP_DETECT_ICC +PHP_DETECT_SUNCC AC_PROG_CC_C_O dnl Support systems with system libraries in e.g. /usr/lib64 @@ -116,6 +120,15 @@ if test "$PHP_DEBUG" = "yes"; then CFLAGS="$CFLAGS -O0" CXXFLAGS="$CXXFLAGS -O0" fi + if test "$SUNCC" = "yes"; then + if test -n "$auto_cflags"; then + CFLAGS="-g" + CXXFLAGS="-g" + else + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CFLAGS -g" + fi + fi else PHP_DEBUG=0 ZEND_DEBUG=no