Mercurial > hg > nginx-quic
annotate auto/cc/sunc @ 4366:8aab24694c91 stable-1.0
Merge of r4313:
Added escaping of double quotes in ngx_escape_html().
Patch by Zaur Abasmirzoev.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 14 Dec 2011 18:04:06 +0000 |
parents | 0ea785433fcf |
children | d620f497c50f |
rev | line source |
---|---|
561 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
1309 | 5 # Sun C 5.7 Patch 117837-04 2005/05/11 Sun Studio 10 |
6 # Sun C 5.8 2005/10/13 Sun Studio 11 | |
7 # Sun C 5.9 SunOS_i386 2007/05/03 Sun Studio 12 | |
8 # Sun C 5.9 SunOS_sparc 2007/05/03 | |
4044 | 9 # Sun C 5.10 SunOS_i386 2009/06/03 Sun Studio 12.1 |
10 # Sun C 5.11 SunOS_i386 2010/08/13 Sun Studio 12.2 | |
561 | 11 |
12 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
|
13 | sed -e 's/^.* Sun C \(.*\)/\1/'` |
561 | 14 |
15 echo " + Sun C version: $NGX_SUNC_VER" | |
16 | |
17 have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define | |
18 | |
19 | |
1309 | 20 cat << END > $NGX_AUTOTEST.c |
21 | |
22 int main() { printf("%d", __SUNPRO_C); } | |
23 | |
24 END | |
25 | |
26 eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1" | |
27 | |
28 if [ -x $NGX_AUTOTEST ]; then | |
29 ngx_sunc_ver=`$NGX_AUTOTEST` | |
30 fi | |
31 | |
32 rm $NGX_AUTOTEST* | |
33 | |
34 # 1424 == 0x590, Sun Studio 12 | |
35 | |
36 if [ "$ngx_sunc_ver" -ge 1424 ]; then | |
37 ngx_sparc32="-m32" | |
38 ngx_sparc64="-m64" | |
39 ngx_amd64="-m64" | |
40 | |
41 else | |
42 ngx_sparc32="-xarch=v8plus" | |
43 ngx_sparc64="-xarch=v9" | |
1343
d77866cf2cc4
fix building on amd64 by Sun Studio 11 and more early versions
Igor Sysoev <igor@sysoev.ru>
parents:
1324
diff
changeset
|
44 ngx_amd64="-xarch=amd64" |
1309 | 45 fi |
46 | |
744 | 47 case "$NGX_MACHINE" in |
561 | 48 |
744 | 49 i86pc) |
561 | 50 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
51 ;; | |
52 | |
744 | 53 sun4u | sun4v) |
561 | 54 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il" |
55 ;; | |
56 | |
57 esac | |
58 | |
59 | |
60 # optimizations | |
61 | |
4044 | 62 # 20736 == 0x5100, Sun Studio 12.1 |
63 | |
64 if [ "$ngx_sunc_ver" -ge 20736 ]; then | |
65 ngx_fast="-fast" | |
66 | |
67 else | |
68 # older versions had problems with bit-fields | |
69 ngx_fast="-fast -xalias_level=any" | |
70 fi | |
71 | |
1309 | 72 IPO=-xipo |
4044 | 73 CFLAGS="$CFLAGS $ngx_fast $IPO" |
74 CORE_LINK="$CORE_LINK $ngx_fast $IPO" | |
561 | 75 |
76 | |
77 case $CPU in | |
78 pentium) | |
79 # optimize for Pentium and Athlon | |
80 CPU_OPT="-xchip=pentium" | |
81 ;; | |
82 | |
83 pentiumpro) | |
84 # optimize for Pentium Pro, Pentium II | |
85 CPU_OPT="-xchip=pentium_pro" | |
86 ;; | |
87 | |
88 pentium3) | |
89 # optimize for Pentium III | |
90 CPU_OPT="-xchip=pentium3" | |
91 #CPU_OPT="$CPU_OPT -xarch=sse" | |
92 CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4" | |
93 ;; | |
94 | |
95 pentium4) | |
96 # optimize for Pentium 4 | |
97 CPU_OPT="-xchip=pentium4" | |
98 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
99 CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8" | |
100 ;; | |
101 | |
102 opteron) | |
103 # optimize for Opteron | |
104 CPU_OPT="-xchip=opteron" | |
105 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
106 CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16" | |
107 ;; | |
108 | |
1308
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
109 sparc32) |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
110 # build 32-bit UltraSparc binary |
1309 | 111 CPU_OPT="$ngx_sparc32" |
112 CORE_LINK="$CORE_LINK $ngx_sparc32" | |
113 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc32" | |
1308
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
114 NGX_CPU_CACHE_LINE=64 |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
115 ;; |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
116 |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
117 sparc64) |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
118 # build 64-bit UltraSparc binary |
1309 | 119 CPU_OPT="$ngx_sparc64" |
120 CORE_LINK="$CORE_LINK $ngx_sparc64" | |
121 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc64" | |
1308
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
122 NGX_CPU_CACHE_LINE=64 |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
123 ;; |
63fa39cf8bd0
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
Igor Sysoev <igor@sysoev.ru>
parents:
1307
diff
changeset
|
124 |
561 | 125 amd64) |
126 # build 64-bit amd64 binary | |
1309 | 127 CPU_OPT="$ngx_amd64" |
128 CORE_LINK="$CORE_LINK $ngx_amd64" | |
1324
d01f9856e3a0
fix building on amd64 and add -xipo to the link stage
Igor Sysoev <igor@sysoev.ru>
parents:
1309
diff
changeset
|
129 CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_amd64" |
561 | 130 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il" |
1309 | 131 NGX_CPU_CACHE_LINE=64 |
561 | 132 ;; |
133 | |
134 esac | |
135 | |
136 | |
137 CFLAGS="$CFLAGS $CPU_OPT" | |
138 | |
139 | |
140 if [ ".$PCRE_OPT" = "." ]; then | |
4044 | 141 PCRE_OPT="$ngx_fast $IPO $CPU_OPT" |
561 | 142 fi |
143 | |
144 if [ ".$MD5_OPT" = "." ]; then | |
4044 | 145 MD5_OPT="$ngx_fast $IPO $CPU_OPT" |
561 | 146 fi |
147 | |
148 if [ ".$ZLIB_OPT" = "." ]; then | |
4044 | 149 ZLIB_OPT="$ngx_fast $IPO $CPU_OPT" |
561 | 150 fi |
151 | |
152 | |
153 # stop on warning | |
154 CFLAGS="$CFLAGS -errwarn=%all" | |
1375
8d7120543619
add debug info for Sun Studio
Igor Sysoev <igor@sysoev.ru>
parents:
1343
diff
changeset
|
155 |
8d7120543619
add debug info for Sun Studio
Igor Sysoev <igor@sysoev.ru>
parents:
1343
diff
changeset
|
156 # debug |
8d7120543619
add debug info for Sun Studio
Igor Sysoev <igor@sysoev.ru>
parents:
1343
diff
changeset
|
157 CFLAGS="$CFLAGS -g" |