Mercurial > hg > nginx-quic
annotate auto/cc/icc @ 4037:f4dd627c657f stable-1.0
Merge of r4035:
Cache size accounting fix: actual cache size on disk was less than
needed by sum of sizes of files loaded by worker processes themselves
while cache loader was running.
The bug has been introduced in r3900.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 29 Aug 2011 09:35:00 +0000 |
parents | d2adfc714819 |
children | 7ee8e11e17bb |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
589 | 5 # Intel C++ compiler 7.1, 8.0, 8.1, 9.0 |
455 | 6 |
521 | 7 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \ |
1170
5e878722ad57
remove trailing space in icc version
Igor Sysoev <igor@sysoev.ru>
parents:
681
diff
changeset
|
8 | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'` |
521 | 9 |
10 echo " + icc version: $NGX_ICC_VER" | |
11 | |
557 | 12 have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define |
13 | |
521 | 14 |
455 | 15 # optimizations |
16 | |
17 CFLAGS="$CFLAGS -O" | |
501 | 18 # inline the functions declared with __inline |
455 | 19 #CFLAGS="$CFLAGS -Ob1" |
20 # inline any function, at the compiler's discretion | |
21 CFLAGS="$CFLAGS -Ob2" | |
22 | |
23 # multi-file IP optimizations | |
563 | 24 case "$NGX_ICC_VER" in |
25 9.*) | |
26 IPO="-ipo" | |
27 ;; | |
28 | |
1171
d2adfc714819
8.1.38 under FreeBSD can not link -ipo
Igor Sysoev <igor@sysoev.ru>
parents:
1170
diff
changeset
|
29 # 8.1.38 under FreeBSD can not link -ipo |
d2adfc714819
8.1.38 under FreeBSD can not link -ipo
Igor Sysoev <igor@sysoev.ru>
parents:
1170
diff
changeset
|
30 8.1) |
d2adfc714819
8.1.38 under FreeBSD can not link -ipo
Igor Sysoev <igor@sysoev.ru>
parents:
1170
diff
changeset
|
31 IPO="-ip" |
d2adfc714819
8.1.38 under FreeBSD can not link -ipo
Igor Sysoev <igor@sysoev.ru>
parents:
1170
diff
changeset
|
32 ;; |
d2adfc714819
8.1.38 under FreeBSD can not link -ipo
Igor Sysoev <igor@sysoev.ru>
parents:
1170
diff
changeset
|
33 |
563 | 34 *) |
35 IPO="-ipo -ipo_obj" | |
36 ;; | |
37 esac | |
38 | |
601 | 39 # single-file IP optimizations |
40 #IPO="-ip" | |
41 | |
455 | 42 CFLAGS="$CFLAGS $IPO" |
43 CORE_LINK="$CORE_LINK $IPO" | |
469 | 44 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" |
455 | 45 |
573 | 46 |
455 | 47 case $CPU in |
48 pentium) | |
49 # optimize for Pentium and Athlon | |
50 CPU_OPT="-march=pentium" | |
51 ;; | |
52 | |
53 pentiumpro) | |
54 # optimize for Pentium Pro, Pentium II and Pentium III | |
55 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro" | |
56 ;; | |
57 | |
58 pentium4) | |
59 # optimize for Pentium 4, default | |
60 CPU_OPT="-march=pentium4" | |
61 ;; | |
62 esac | |
63 | |
64 CFLAGS="$CFLAGS $CPU_OPT" | |
65 | |
66 if [ ".$PCRE_OPT" = "." ]; then | |
67 PCRE_OPT="-O $IPO $CPU_OPT" | |
68 fi | |
69 | |
70 if [ ".$MD5_OPT" = "." ]; then | |
71 MD5_OPT="-O $IPO $CPU_OPT" | |
72 fi | |
73 | |
74 if [ ".$ZLIB_OPT" = "." ]; then | |
75 ZLIB_OPT="-O $IPO $CPU_OPT" | |
76 fi | |
77 | |
78 | |
79 # warnings | |
80 | |
501 | 81 CFLAGS="$CFLAGS -w2" |
82 | |
83 # disable some warnings | |
455 | 84 |
501 | 85 # invalid type conversion: "int" to "char *" |
86 CFLAGS="$CFLAGS -wd171" | |
87 # argument is incompatible with corresponding format string conversion | |
88 CFLAGS="$CFLAGS -wd181" | |
89 # zero used for undefined preprocessing identifier | |
90 CFLAGS="$CFLAGS -wd193" | |
563 | 91 # the format string ends before this argument |
519 | 92 CFLAGS="$CFLAGS -wd268" |
501 | 93 # invalid format string conversion |
94 CFLAGS="$CFLAGS -wd269" | |
95 # conversion from "long long" to "size_t" may lose significant bits | |
96 CFLAGS="$CFLAGS -wd810" | |
97 # parameter was never referenced | |
98 CFLAGS="$CFLAGS -wd869" | |
681 | 99 # attribute "unused" is only allowed in a function definition, warning on pTHX_ |
100 CFLAGS="$CFLAGS -wd1301" | |
501 | 101 |
102 # STUB | |
103 # enumerated type mixed with another type | |
104 CFLAGS="$CFLAGS -wd188" | |
105 # controlling expression is constant | |
106 CFLAGS="$CFLAGS -wd279" | |
107 # operands are evaluated in unspecified order | |
108 CFLAGS="$CFLAGS -wd981" | |
109 # external definition with no prior declaration | |
110 CFLAGS="$CFLAGS -wd1418" | |
111 # external declaration in primary source file | |
112 CFLAGS="$CFLAGS -wd1419" | |
521 | 113 |
114 case "$NGX_ICC_VER" in | |
573 | 115 9.*) |
577 | 116 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
521 | 117 CFLAGS="$CFLAGS -wd1469" |
563 | 118 # explicit conversion of a 64-bit integral type to a smaller |
119 # integral type | |
120 CFLAGS="$CFLAGS -wd1683" | |
121 # conversion from pointer to same-sized integral type, | |
122 # warning on offsetof() | |
123 CFLAGS="$CFLAGS -wd1684" | |
595 | 124 # floating-point equality and inequality comparisons are unreliable, |
125 # warning on SvTRUE() | |
126 CFLAGS="$CFLAGS -wd1572" | |
521 | 127 ;; |
128 | |
573 | 129 8.*) |
577 | 130 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
573 | 131 CFLAGS="$CFLAGS -wd1469" |
595 | 132 # floating-point equality and inequality comparisons are unreliable, |
133 # warning on SvTRUE() | |
134 CFLAGS="$CFLAGS -wd1572" | |
573 | 135 ;; |
136 | |
521 | 137 *) |
138 ;; | |
139 esac | |
479 | 140 |
455 | 141 # stop on warning |
142 CFLAGS="$CFLAGS -Werror" | |
143 | |
144 # debug | |
145 CFLAGS="$CFLAGS -g" |