summaryrefslogtreecommitdiff
path: root/auto
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-10-12 13:45:55 +0000
committerJonathan Kolb <jon@b0g.us>2005-10-12 13:45:55 +0000
commitfd595b525d35869e14ed8ef4bd2d3c0422fd204a (patch)
tree4425816b44e4f7b2569de02b4ab8f1e128773201 /auto
parent071676254b6e52f7adb0f83911805f44f15ef8ce (diff)
downloadnginx-fd595b525d35869e14ed8ef4bd2d3c0422fd204a.tar.gz
Changes with nginx 0.3.2 12 Oct 2005v0.3.2
*) Feature: the Sun Studio 10 C compiler support. *) Feature: the "proxy_upstream_max_fails", "proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails", and "fastcgi_upstream_fail_timeout" directives.
Diffstat (limited to 'auto')
-rw-r--r--auto/cc/conf8
-rw-r--r--auto/cc/gcc13
-rw-r--r--auto/cc/icc2
-rw-r--r--auto/cc/name6
-rw-r--r--auto/cc/sunc95
-rw-r--r--auto/lib/openssl/conf6
-rw-r--r--auto/lib/pcre/conf2
-rw-r--r--auto/make10
-rw-r--r--auto/os/solaris12
-rw-r--r--auto/sources11
10 files changed, 146 insertions, 19 deletions
diff --git a/auto/cc/conf b/auto/cc/conf
index 4d151da96..37f2d2e42 100644
--- a/auto/cc/conf
+++ b/auto/cc/conf
@@ -44,7 +44,7 @@ else
gcc)
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
- # 4.0.0
+ # 4.0.0, 4.0.1, 4.1.0
. auto/cc/gcc
;;
@@ -55,6 +55,12 @@ else
. auto/cc/icc
;;
+ sunc)
+ # Sun C 5.7 Patch 117837-04 2005/05/11
+
+ . auto/cc/sunc
+ ;;
+
ccc)
# Compaq C V6.5-207
diff --git a/auto/cc/gcc b/auto/cc/gcc
index d76d4a23c..af279fa43 100644
--- a/auto/cc/gcc
+++ b/auto/cc/gcc
@@ -33,6 +33,17 @@ if [ $ngx_found = yes ]; then
PIPE="-pipe"
fi
+
+case "$NGX_PLATFORM" in
+
+ *:sun4u)
+ # "-mcpu=v9" enables the "casxa" assembler instruction
+ CFLAGS="$CFLAGS -mcpu=v9"
+ ;;
+
+esac
+
+
# optimizations
#NGX_GCC_OPT="-O2"
@@ -49,7 +60,7 @@ case $CPU in
CPU_OPT="-march=pentium"
;;
- pentiumpro)
+ pentiumpro | pentium3)
# optimize for Pentium Pro, Pentium II and Pentium III
CPU_OPT="-march=pentiumpro"
;;
diff --git a/auto/cc/icc b/auto/cc/icc
index cca24cd36..0aa975ed2 100644
--- a/auto/cc/icc
+++ b/auto/cc/icc
@@ -94,6 +94,8 @@ CFLAGS="$CFLAGS -wd1418"
CFLAGS="$CFLAGS -wd1419"
# explicit conversion of a 64-bit integral type to a smaller integral type
CFLAGS="$CFLAGS -wd1683"
+# conversion from pointer to same-sized integral type, warning on offsetof()
+CFLAGS="$CFLAGS -wd1684"
case "$NGX_ICC_VER" in
8.* | 9.*)
diff --git a/auto/cc/name b/auto/cc/name
index c89ce7975..faa329075 100644
--- a/auto/cc/name
+++ b/auto/cc/name
@@ -39,6 +39,11 @@ if `$CC -V 2>&1 | grep '^Intel(R) C' 2>&1 >/dev/null`; then
echo " using Intel C++ compiler"
else
+if `$CC -V 2>&1 | grep 'Sun C' 2>&1 >/dev/null`; then
+ NGX_CC_NAME=sunc
+ echo " using Sun C compiler"
+
+else
if `$CC -V 2>&1 | grep '^Compaq C' 2>&1 >/dev/null`; then
NGX_CC_NAME=ccc
echo " using Compaq C compiler"
@@ -54,6 +59,7 @@ else
fi # acc
fi # ccc
+fi # sunc
fi # icc
fi # gcc
fi # bcc
diff --git a/auto/cc/sunc b/auto/cc/sunc
new file mode 100644
index 000000000..9d400a2ea
--- /dev/null
+++ b/auto/cc/sunc
@@ -0,0 +1,95 @@
+
+# Copyright (C) Igor Sysoev
+
+
+# Sun C 5.7 Patch 117837-04 2005/05/11
+
+NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \
+ | sed -e 's/^.* Sun C \(.*\)/\1/'`
+
+echo " + Sun C version: $NGX_SUNC_VER"
+
+have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define
+
+
+case "$NGX_PLATFORM" in
+
+ *:i86pc)
+ NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
+ ;;
+
+ *:sun4u)
+ # "-xarch=v9" enables the "casa" assembler instruction
+ CFLAGS="$CFLAGS -xarch=v9"
+ CORE_LINK="$CORE_LINK -xarch=v9"
+ NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
+ ;;
+
+esac
+
+
+# optimizations
+
+CFLAGS="$CFLAGS -fast"
+
+
+case $CPU in
+ pentium)
+ # optimize for Pentium and Athlon
+ CPU_OPT="-xchip=pentium"
+ ;;
+
+ pentiumpro)
+ # optimize for Pentium Pro, Pentium II
+ CPU_OPT="-xchip=pentium_pro"
+ ;;
+
+ pentium3)
+ # optimize for Pentium III
+ CPU_OPT="-xchip=pentium3"
+ #CPU_OPT="$CPU_OPT -xarch=sse"
+ CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
+ ;;
+
+ pentium4)
+ # optimize for Pentium 4
+ CPU_OPT="-xchip=pentium4"
+ #CPU_OPT="$CPU_OPT -xarch=sse2"
+ CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
+ ;;
+
+ opteron)
+ # optimize for Opteron
+ CPU_OPT="-xchip=opteron"
+ #CPU_OPT="$CPU_OPT -xarch=sse2"
+ CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
+ ;;
+
+ amd64)
+ # build 64-bit amd64 binary
+ CPU_OPT="-xarch=amd64"
+ CORE_LINK="$CORE_LINK -xarch=amd64"
+ NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
+ ;;
+
+esac
+
+
+CFLAGS="$CFLAGS $CPU_OPT"
+
+
+if [ ".$PCRE_OPT" = "." ]; then
+ PCRE_OPT="-fast $CPU_OPT"
+fi
+
+if [ ".$MD5_OPT" = "." ]; then
+ MD5_OPT="-fast $CPU_OPT"
+fi
+
+if [ ".$ZLIB_OPT" = "." ]; then
+ ZLIB_OPT="-fast $CPU_OPT"
+fi
+
+
+# stop on warning
+CFLAGS="$CFLAGS -errwarn=%all"
diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
index c8c47e2b9..0370fe084 100644
--- a/auto/lib/openssl/conf
+++ b/auto/lib/openssl/conf
@@ -36,6 +36,12 @@ else
if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
OPENSSL=YES
+
+ case "$NGX_SYSTEM" in
+ SunOS)
+ CORE_LIBS="$CORE_LIBS -ldl"
+ ;;
+ esac
fi
fi
diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf
index 1b79f94ec..946b26e32 100644
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -17,7 +17,7 @@ if [ $PCRE != NONE ]; then
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;
- icc*)
+ icc* | sunc )
have=NGX_PCRE . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
diff --git a/auto/make b/auto/make
index 866fb34f2..fcc05b18e 100644
--- a/auto/make
+++ b/auto/make
@@ -200,7 +200,7 @@ fi
cat << END >> $NGX_MAKEFILE
$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c
- $ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c
+ $ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX
END
@@ -219,7 +219,7 @@ do
cat << END >> $NGX_MAKEFILE
$ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src
- $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
+ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
END
@@ -248,7 +248,7 @@ if [ $HTTP = YES ]; then
cat << END >> $NGX_MAKEFILE
$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
- $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
+ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
END
done
@@ -278,7 +278,7 @@ if [ $IMAP = YES ]; then
cat << END >> $NGX_MAKEFILE
$ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src
- $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
+ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
END
done
@@ -310,7 +310,7 @@ if test -n "$NGX_ADDON_SRCS"; then
cat << END >> $NGX_MAKEFILE
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
- $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
+ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
END
done
diff --git a/auto/os/solaris b/auto/os/solaris
index cf7fc6c84..73c9372c8 100644
--- a/auto/os/solaris
+++ b/auto/os/solaris
@@ -12,17 +12,7 @@ CORE_LIBS="$CORE_LIBS -lsocket -lnsl -lrt"
# Solaris's make does not support a blank line between target and rules
ngx_spacer=
-CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lrt"
-
-
-case "$NGX_PLATFORM" in
-
- *:sun4u)
- # "-mcpu=v9" enables the "casa" assembler instruction
- CFLAGS="$CFLAGS -mcpu=v9"
- ;;
-
-esac
+CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl -lrt"
if [ $ZLIB_ASM != NO ]; then
diff --git a/auto/sources b/auto/sources
index bf048948d..bd9259a51 100644
--- a/auto/sources
+++ b/auto/sources
@@ -123,12 +123,23 @@ UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
src/os/unix/ngx_process.h \
src/os/unix/ngx_setproctitle.h \
src/os/unix/ngx_atomic.h \
+ src/os/unix/ngx_gcc_atomic_x86.h \
src/os/unix/ngx_thread.h \
src/os/unix/ngx_socket.h \
src/os/unix/ngx_os.h \
src/os/unix/ngx_user.h \
src/os/unix/ngx_process_cycle.h"
+# add to UNIX_DEPS
+# src/os/unix/ngx_gcc_atomic_amd64.h \
+# src/os/unix/ngx_gcc_atomic_sparc64.h \
+# src/os/unix/ngx_gcc_atomic_ppc.h \
+# src/os/unix/ngx_sunpro_atomic_sparc64.h \
+# src/os/unix/ngx_sunpro_x86.il \
+# src/os/unix/ngx_sunpro_amd64.il \
+# src/os/unix/ngx_sunpro_sparc64.il \
+
+
UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
src/core/ngx_unix_domain.c \
src/os/unix/ngx_time.c \