Mercurial > hg > nginx-quic
annotate auto/cc/icc @ 1170:5e878722ad57
remove trailing space in icc version
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 19 Apr 2007 17:48:49 +0000 |
parents | 7e24168b0853 |
children | d2adfc714819 |
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 | |
29 *) | |
30 IPO="-ipo -ipo_obj" | |
31 ;; | |
32 esac | |
33 | |
601 | 34 # single-file IP optimizations |
35 #IPO="-ip" | |
36 | |
455 | 37 CFLAGS="$CFLAGS $IPO" |
38 CORE_LINK="$CORE_LINK $IPO" | |
469 | 39 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" |
455 | 40 |
573 | 41 |
455 | 42 case $CPU in |
43 pentium) | |
44 # optimize for Pentium and Athlon | |
45 CPU_OPT="-march=pentium" | |
46 ;; | |
47 | |
48 pentiumpro) | |
49 # optimize for Pentium Pro, Pentium II and Pentium III | |
50 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro" | |
51 ;; | |
52 | |
53 pentium4) | |
54 # optimize for Pentium 4, default | |
55 CPU_OPT="-march=pentium4" | |
56 ;; | |
57 esac | |
58 | |
59 CFLAGS="$CFLAGS $CPU_OPT" | |
60 | |
61 if [ ".$PCRE_OPT" = "." ]; then | |
62 PCRE_OPT="-O $IPO $CPU_OPT" | |
63 fi | |
64 | |
65 if [ ".$MD5_OPT" = "." ]; then | |
66 MD5_OPT="-O $IPO $CPU_OPT" | |
67 fi | |
68 | |
69 if [ ".$ZLIB_OPT" = "." ]; then | |
70 ZLIB_OPT="-O $IPO $CPU_OPT" | |
71 fi | |
72 | |
73 | |
74 # warnings | |
75 | |
501 | 76 CFLAGS="$CFLAGS -w2" |
77 | |
78 # disable some warnings | |
455 | 79 |
501 | 80 # invalid type conversion: "int" to "char *" |
81 CFLAGS="$CFLAGS -wd171" | |
82 # argument is incompatible with corresponding format string conversion | |
83 CFLAGS="$CFLAGS -wd181" | |
84 # zero used for undefined preprocessing identifier | |
85 CFLAGS="$CFLAGS -wd193" | |
563 | 86 # the format string ends before this argument |
519 | 87 CFLAGS="$CFLAGS -wd268" |
501 | 88 # invalid format string conversion |
89 CFLAGS="$CFLAGS -wd269" | |
90 # conversion from "long long" to "size_t" may lose significant bits | |
91 CFLAGS="$CFLAGS -wd810" | |
92 # parameter was never referenced | |
93 CFLAGS="$CFLAGS -wd869" | |
681 | 94 # attribute "unused" is only allowed in a function definition, warning on pTHX_ |
95 CFLAGS="$CFLAGS -wd1301" | |
501 | 96 |
97 # STUB | |
98 # enumerated type mixed with another type | |
99 CFLAGS="$CFLAGS -wd188" | |
100 # controlling expression is constant | |
101 CFLAGS="$CFLAGS -wd279" | |
102 # operands are evaluated in unspecified order | |
103 CFLAGS="$CFLAGS -wd981" | |
104 # external definition with no prior declaration | |
105 CFLAGS="$CFLAGS -wd1418" | |
106 # external declaration in primary source file | |
107 CFLAGS="$CFLAGS -wd1419" | |
521 | 108 |
109 case "$NGX_ICC_VER" in | |
573 | 110 9.*) |
577 | 111 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
521 | 112 CFLAGS="$CFLAGS -wd1469" |
563 | 113 # explicit conversion of a 64-bit integral type to a smaller |
114 # integral type | |
115 CFLAGS="$CFLAGS -wd1683" | |
116 # conversion from pointer to same-sized integral type, | |
117 # warning on offsetof() | |
118 CFLAGS="$CFLAGS -wd1684" | |
595 | 119 # floating-point equality and inequality comparisons are unreliable, |
120 # warning on SvTRUE() | |
121 CFLAGS="$CFLAGS -wd1572" | |
521 | 122 ;; |
123 | |
573 | 124 8.*) |
577 | 125 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
573 | 126 CFLAGS="$CFLAGS -wd1469" |
595 | 127 # floating-point equality and inequality comparisons are unreliable, |
128 # warning on SvTRUE() | |
129 CFLAGS="$CFLAGS -wd1572" | |
573 | 130 ;; |
131 | |
521 | 132 *) |
133 ;; | |
134 esac | |
479 | 135 |
455 | 136 # stop on warning |
137 CFLAGS="$CFLAGS -Werror" | |
138 | |
139 # debug | |
140 CFLAGS="$CFLAGS -g" |