comparison auto/cc/sunc @ 110:dad2fe8ecf08 NGINX_0_3_2

nginx 0.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.
author Igor Sysoev <http://sysoev.ru>
date Wed, 12 Oct 2005 00:00:00 +0400
parents
children c982febb7588
comparison
equal deleted inserted replaced
109:97da525033a1 110:dad2fe8ecf08
1
2 # Copyright (C) Igor Sysoev
3
4
5 # Sun C 5.7 Patch 117837-04 2005/05/11
6
7 NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \
8 | sed -e 's/^.* Sun C \(.*\)/\1/'`
9
10 echo " + Sun C version: $NGX_SUNC_VER"
11
12 have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define
13
14
15 case "$NGX_PLATFORM" in
16
17 *:i86pc)
18 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
19 ;;
20
21 *:sun4u)
22 # "-xarch=v9" enables the "casa" assembler instruction
23 CFLAGS="$CFLAGS -xarch=v9"
24 CORE_LINK="$CORE_LINK -xarch=v9"
25 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
26 ;;
27
28 esac
29
30
31 # optimizations
32
33 CFLAGS="$CFLAGS -fast"
34
35
36 case $CPU in
37 pentium)
38 # optimize for Pentium and Athlon
39 CPU_OPT="-xchip=pentium"
40 ;;
41
42 pentiumpro)
43 # optimize for Pentium Pro, Pentium II
44 CPU_OPT="-xchip=pentium_pro"
45 ;;
46
47 pentium3)
48 # optimize for Pentium III
49 CPU_OPT="-xchip=pentium3"
50 #CPU_OPT="$CPU_OPT -xarch=sse"
51 CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
52 ;;
53
54 pentium4)
55 # optimize for Pentium 4
56 CPU_OPT="-xchip=pentium4"
57 #CPU_OPT="$CPU_OPT -xarch=sse2"
58 CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
59 ;;
60
61 opteron)
62 # optimize for Opteron
63 CPU_OPT="-xchip=opteron"
64 #CPU_OPT="$CPU_OPT -xarch=sse2"
65 CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
66 ;;
67
68 amd64)
69 # build 64-bit amd64 binary
70 CPU_OPT="-xarch=amd64"
71 CORE_LINK="$CORE_LINK -xarch=amd64"
72 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
73 ;;
74
75 esac
76
77
78 CFLAGS="$CFLAGS $CPU_OPT"
79
80
81 if [ ".$PCRE_OPT" = "." ]; then
82 PCRE_OPT="-fast $CPU_OPT"
83 fi
84
85 if [ ".$MD5_OPT" = "." ]; then
86 MD5_OPT="-fast $CPU_OPT"
87 fi
88
89 if [ ".$ZLIB_OPT" = "." ]; then
90 ZLIB_OPT="-fast $CPU_OPT"
91 fi
92
93
94 # stop on warning
95 CFLAGS="$CFLAGS -errwarn=%all"