Mercurial > hg > nginx
annotate auto/cc/sunc @ 697:36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 15 Sep 2006 19:33:55 +0000 |
parents | e48ebafc6939 |
children | 67deba330372 |
rev | line source |
---|---|
561 | 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) | |
697
36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
18 # disable [ PAUSE ] hwcap for Sun Studio 11 |
36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
19 CORE_LINK="$CORE_LINK -Msrc/os/unix/ngx_sunpro_x86.map" |
36c51f8f0f4d
disable [ PAUSE ] hwcap for Sun Studio 11
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
20 |
561 | 21 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
22 ;; | |
23 | |
24 *:sun4u) | |
25 # "-xarch=v9" enables the "casa" assembler instruction | |
26 CFLAGS="$CFLAGS -xarch=v9" | |
27 CORE_LINK="$CORE_LINK -xarch=v9" | |
28 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il" | |
29 ;; | |
30 | |
31 esac | |
32 | |
33 | |
34 # optimizations | |
35 | |
36 CFLAGS="$CFLAGS -fast" | |
37 | |
38 | |
39 case $CPU in | |
40 pentium) | |
41 # optimize for Pentium and Athlon | |
42 CPU_OPT="-xchip=pentium" | |
43 ;; | |
44 | |
45 pentiumpro) | |
46 # optimize for Pentium Pro, Pentium II | |
47 CPU_OPT="-xchip=pentium_pro" | |
48 ;; | |
49 | |
50 pentium3) | |
51 # optimize for Pentium III | |
52 CPU_OPT="-xchip=pentium3" | |
53 #CPU_OPT="$CPU_OPT -xarch=sse" | |
54 CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4" | |
55 ;; | |
56 | |
57 pentium4) | |
58 # optimize for Pentium 4 | |
59 CPU_OPT="-xchip=pentium4" | |
60 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
61 CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8" | |
62 ;; | |
63 | |
64 opteron) | |
65 # optimize for Opteron | |
66 CPU_OPT="-xchip=opteron" | |
67 #CPU_OPT="$CPU_OPT -xarch=sse2" | |
68 CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16" | |
69 ;; | |
70 | |
71 amd64) | |
72 # build 64-bit amd64 binary | |
73 CPU_OPT="-xarch=amd64" | |
74 CORE_LINK="$CORE_LINK -xarch=amd64" | |
75 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il" | |
76 ;; | |
77 | |
78 esac | |
79 | |
80 | |
81 CFLAGS="$CFLAGS $CPU_OPT" | |
82 | |
83 | |
84 if [ ".$PCRE_OPT" = "." ]; then | |
85 PCRE_OPT="-fast $CPU_OPT" | |
86 fi | |
87 | |
88 if [ ".$MD5_OPT" = "." ]; then | |
89 MD5_OPT="-fast $CPU_OPT" | |
90 fi | |
91 | |
92 if [ ".$ZLIB_OPT" = "." ]; then | |
93 ZLIB_OPT="-fast $CPU_OPT" | |
94 fi | |
95 | |
96 | |
97 # stop on warning | |
98 CFLAGS="$CFLAGS -errwarn=%all" |