Mercurial > hg > nginx-quic
annotate auto/cc/sunc @ 1612:d72f8b48dd87 stable-0.5
r1545, r1546 merge:
ngx_escape_html(), SSI echo encoding
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 29 Oct 2007 15:03:04 +0000 |
parents | 7a41db04d1b8 |
children |
rev | line source |
---|---|
561 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
5 # Sun C 5.7 Patch 117837-04 2005/05/11 Sun Studio 10 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
6 # Sun C 5.8 2005/10/13 Sun Studio 11 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
7 # Sun C 5.9 SunOS_i386 2007/05/03 Sun Studio 12 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
8 # Sun C 5.9 SunOS_sparc 2007/05/03 |
561 | 9 |
10 NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \ | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
11 | sed -e 's/^.* Sun C \(.*\)/\1/'` |
561 | 12 |
13 echo " + Sun C version: $NGX_SUNC_VER" | |
14 | |
15 have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define | |
16 | |
17 | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
18 cat << END > $NGX_AUTOTEST.c |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
19 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
20 int main() { printf("%d", __SUNPRO_C); } |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
21 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
22 END |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
23 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
24 eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
25 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
26 if [ -x $NGX_AUTOTEST ]; then |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
27 ngx_sunc_ver=`$NGX_AUTOTEST` |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
28 fi |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
29 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
30 rm $NGX_AUTOTEST* |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
31 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
32 # 1424 == 0x590, Sun Studio 12 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
33 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
34 if [ "$ngx_sunc_ver" -ge 1424 ]; then |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
35 ngx_sparc32="-m32" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
36 ngx_sparc64="-m64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
37 ngx_amd64="-m64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
38 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
39 else |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
40 ngx_sparc32="-xarch=v8plus" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
41 ngx_sparc64="-xarch=v9" |
1345 | 42 ngx_amd64="-xarch=amd64" |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
43 fi |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
44 |
744 | 45 case "$NGX_MACHINE" in |
561 | 46 |
744 | 47 i86pc) |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
48 ngx_feature="PAUSE hardware capability bug" |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
49 ngx_feature_name= |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
50 ngx_feature_run=bug |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
51 ngx_feature_incs= |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
744
diff
changeset
|
52 ngx_feature_path= |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
53 ngx_feature_libs= |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
54 ngx_feature_test='__asm ("pause")' |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
55 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
56 . auto/feature |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
57 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
58 if [ $ngx_found = yes ]; then |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
59 # disable [ PAUSE ] hwcap for Sun Studio 11 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
60 CORE_LINK="$CORE_LINK -Msrc/os/unix/ngx_sunpro_x86.map" |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
61 fi |
697
36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
62 |
561 | 63 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
64 ;; | |
65 | |
744 | 66 sun4u | sun4v) |
561 | 67 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il" |
68 ;; | |
69 | |
70 esac | |
71 | |
72 | |
73 # optimizations | |
74 | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
75 IPO=-xipo |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
76 CFLAGS="$CFLAGS -fast $IPO" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
77 CORE_LINK="$CORE_LINK -fast $IPO" |
561 | 78 |
79 | |
80 case $CPU in | |
81 pentium) | |
82 # optimize for Pentium and Athlon | |
83 CPU_OPT="-xchip=pentium" | |
84 ;; | |
85 | |
86 pentiumpro) | |
87 # optimize for Pentium Pro, Pentium II | |
88 CPU_OPT="-xchip=pentium_pro" | |
89 ;; | |
90 | |
91 pentium3) | |
92 # optimize for Pentium III | |
93 CPU_OPT="-xchip=pentium3" | |
94 #CPU_OPT="$CPU_OPT -xarch=sse" | |
95 CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4" | |
96 ;; | |
97 | |
98 pentium4) | |
99 # optimize for Pentium 4 | |
100 CPU_OPT="-xchip=pentium4" | |
101 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
102 CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8" | |
103 ;; | |
104 | |
105 opteron) | |
106 # optimize for Opteron | |
107 CPU_OPT="-xchip=opteron" | |
108 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
109 CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16" | |
110 ;; | |
111 | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
112 sparc32) |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
113 # build 32-bit UltraSparc binary |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
114 CPU_OPT="$ngx_sparc32" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
115 CORE_LINK="$CORE_LINK $ngx_sparc32" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
116 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc32" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
117 NGX_CPU_CACHE_LINE=64 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
118 ;; |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
119 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
120 sparc64) |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
121 # build 64-bit UltraSparc binary |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
122 CPU_OPT="$ngx_sparc64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
123 CORE_LINK="$CORE_LINK $ngx_sparc64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
124 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
125 NGX_CPU_CACHE_LINE=64 |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
126 ;; |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
127 |
561 | 128 amd64) |
129 # build 64-bit amd64 binary | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
130 CPU_OPT="$ngx_amd64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
131 CORE_LINK="$CORE_LINK $ngx_amd64" |
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
132 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_amd64" |
561 | 133 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il" |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
134 NGX_CPU_CACHE_LINE=64 |
561 | 135 ;; |
136 | |
137 esac | |
138 | |
139 | |
140 CFLAGS="$CFLAGS $CPU_OPT" | |
141 | |
142 | |
143 if [ ".$PCRE_OPT" = "." ]; then | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
144 PCRE_OPT="-fast $IPO $CPU_OPT" |
561 | 145 fi |
146 | |
147 if [ ".$MD5_OPT" = "." ]; then | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
148 MD5_OPT="-fast $IPO $CPU_OPT" |
561 | 149 fi |
150 | |
151 if [ ".$ZLIB_OPT" = "." ]; then | |
1327
b766d9c0a2be
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
152 ZLIB_OPT="-fast $IPO $CPU_OPT" |
561 | 153 fi |
154 | |
155 | |
156 # stop on warning | |
157 CFLAGS="$CFLAGS -errwarn=%all" | |
1383 | 158 |
159 # debug | |
160 CFLAGS="$CFLAGS -g" |