diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2011-08-29 12:50:35 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2011-08-29 12:50:35 +0000 |
| commit | 1c95e6c3050bf2114d72029824fdadf001cc300e (patch) | |
| tree | 23864a9f2f926e862609fbef516ad07156dbdc14 | |
| parent | ef24db717ca6bc87d2214f3d7c103cac8ced9066 (diff) | |
| download | nginx-1c95e6c3050bf2114d72029824fdadf001cc300e.tar.gz nginx-1c95e6c3050bf2114d72029824fdadf001cc300e.tar.bz2 | |
Merge of r4004, r4005:
Solaris related fixes:
*) Detect POSIX semaphores in librt on Solaris (ticket #3).
Patch by Denis Ivanov.
*) Lower optimization level for Sun Studio before 12.1.
At least Sun Studio 12 has problems with bit-fields exposed by nginx code
(caught by test suite). They seems to be fixed in Sun Studio 12.1. As a
workaround use "-fast -xalias_level=any" for older versions, it resolves
the problem.
Diffstat (limited to '')
| -rw-r--r-- | auto/cc/sunc | 22 | ||||
| -rwxr-xr-x | auto/unix | 13 |
2 files changed, 30 insertions, 5 deletions
diff --git a/auto/cc/sunc b/auto/cc/sunc index 1d3c68700..69e6c2c71 100644 --- a/auto/cc/sunc +++ b/auto/cc/sunc @@ -6,6 +6,8 @@ # Sun C 5.8 2005/10/13 Sun Studio 11 # Sun C 5.9 SunOS_i386 2007/05/03 Sun Studio 12 # Sun C 5.9 SunOS_sparc 2007/05/03 +# Sun C 5.10 SunOS_i386 2009/06/03 Sun Studio 12.1 +# Sun C 5.11 SunOS_i386 2010/08/13 Sun Studio 12.2 NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \ | sed -e 's/^.* Sun C \(.*\)/\1/'` @@ -57,9 +59,19 @@ esac # optimizations +# 20736 == 0x5100, Sun Studio 12.1 + +if [ "$ngx_sunc_ver" -ge 20736 ]; then + ngx_fast="-fast" + +else + # older versions had problems with bit-fields + ngx_fast="-fast -xalias_level=any" +fi + IPO=-xipo -CFLAGS="$CFLAGS -fast $IPO" -CORE_LINK="$CORE_LINK -fast $IPO" +CFLAGS="$CFLAGS $ngx_fast $IPO" +CORE_LINK="$CORE_LINK $ngx_fast $IPO" case $CPU in @@ -126,15 +138,15 @@ CFLAGS="$CFLAGS $CPU_OPT" if [ ".$PCRE_OPT" = "." ]; then - PCRE_OPT="-fast $IPO $CPU_OPT" + PCRE_OPT="$ngx_fast $IPO $CPU_OPT" fi if [ ".$MD5_OPT" = "." ]; then - MD5_OPT="-fast $IPO $CPU_OPT" + MD5_OPT="$ngx_fast $IPO $CPU_OPT" fi if [ ".$ZLIB_OPT" = "." ]; then - ZLIB_OPT="-fast $IPO $CPU_OPT" + ZLIB_OPT="$ngx_fast $IPO $CPU_OPT" fi @@ -620,6 +620,19 @@ if [ $ngx_found = no ]; then fi +if [ $ngx_found = no ]; then + + # Solaris has POSIX semaphores in librt + ngx_feature="POSIX semaphores in librt" + ngx_feature_libs=-lrt + . auto/feature + + if [ $ngx_found = yes ]; then + CORE_LIBS="$CORE_LIBS -lrt" + fi +fi + + ngx_feature="struct msghdr.msg_control" ngx_feature_name="NGX_HAVE_MSGHDR_MSG_CONTROL" ngx_feature_run=no |
