Mercurial > hg > nginx-quic
annotate auto/cc/sunc @ 889:a9a7e4b1a72b
the previous fix does not actually fix overflow
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 06 Dec 2006 11:33:18 +0000 |
parents | 7af8276b1c2f |
children | 811fb97b9bf7 b766d9c0a2be |
rev | line source |
---|---|
561 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 # Sun C 5.7 Patch 117837-04 2005/05/11 | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
6 # Sun C 5.8 2005/10/13 |
561 | 7 |
8 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
|
9 | sed -e 's/^.* Sun C \(.*\)/\1/'` |
561 | 10 |
11 echo " + Sun C version: $NGX_SUNC_VER" | |
12 | |
13 have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define | |
14 | |
15 | |
744 | 16 case "$NGX_MACHINE" in |
561 | 17 |
744 | 18 i86pc) |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
19 ngx_feature="PAUSE hardware capability bug" |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
20 ngx_feature_name= |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
21 ngx_feature_run=bug |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
22 ngx_feature_incs= |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
744
diff
changeset
|
23 ngx_feature_path= |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
24 ngx_feature_libs= |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
25 ngx_feature_test='__asm ("pause")' |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
26 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
27 . auto/feature |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
28 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
29 if [ $ngx_found = yes ]; then |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
30 # disable [ PAUSE ] hwcap for Sun Studio 11 |
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
697
diff
changeset
|
31 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
|
32 fi |
697
36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
33 |
561 | 34 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
35 ;; | |
36 | |
744 | 37 sun4u | sun4v) |
561 | 38 # "-xarch=v9" enables the "casa" assembler instruction |
39 CFLAGS="$CFLAGS -xarch=v9" | |
40 CORE_LINK="$CORE_LINK -xarch=v9" | |
41 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il" | |
42 ;; | |
43 | |
44 esac | |
45 | |
46 | |
47 # optimizations | |
48 | |
49 CFLAGS="$CFLAGS -fast" | |
50 | |
51 | |
52 case $CPU in | |
53 pentium) | |
54 # optimize for Pentium and Athlon | |
55 CPU_OPT="-xchip=pentium" | |
56 ;; | |
57 | |
58 pentiumpro) | |
59 # optimize for Pentium Pro, Pentium II | |
60 CPU_OPT="-xchip=pentium_pro" | |
61 ;; | |
62 | |
63 pentium3) | |
64 # optimize for Pentium III | |
65 CPU_OPT="-xchip=pentium3" | |
66 #CPU_OPT="$CPU_OPT -xarch=sse" | |
67 CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4" | |
68 ;; | |
69 | |
70 pentium4) | |
71 # optimize for Pentium 4 | |
72 CPU_OPT="-xchip=pentium4" | |
73 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
74 CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8" | |
75 ;; | |
76 | |
77 opteron) | |
78 # optimize for Opteron | |
79 CPU_OPT="-xchip=opteron" | |
80 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
81 CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16" | |
82 ;; | |
83 | |
84 amd64) | |
85 # build 64-bit amd64 binary | |
86 CPU_OPT="-xarch=amd64" | |
87 CORE_LINK="$CORE_LINK -xarch=amd64" | |
88 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il" | |
89 ;; | |
90 | |
91 esac | |
92 | |
93 | |
94 CFLAGS="$CFLAGS $CPU_OPT" | |
95 | |
96 | |
97 if [ ".$PCRE_OPT" = "." ]; then | |
98 PCRE_OPT="-fast $CPU_OPT" | |
99 fi | |
100 | |
101 if [ ".$MD5_OPT" = "." ]; then | |
102 MD5_OPT="-fast $CPU_OPT" | |
103 fi | |
104 | |
105 if [ ".$ZLIB_OPT" = "." ]; then | |
106 ZLIB_OPT="-fast $CPU_OPT" | |
107 fi | |
108 | |
109 | |
110 # stop on warning | |
111 CFLAGS="$CFLAGS -errwarn=%all" |