2 # Copyright (C) Igor Sysoev
5 # Intel C++ compiler 7.1, 8.0, 8.1, 9.0
7 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \
8 | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'`
10 echo " + icc version: $NGX_ICC_VER"
12 have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define
18 # inline the functions declared with __inline
19 #CFLAGS="$CFLAGS -Ob1"
20 # inline any function, at the compiler's discretion
23 # multi-file IP optimizations
24 case "$NGX_ICC_VER" in
29 # 8.1.38 under FreeBSD can not link -ipo
39 # single-file IP optimizations
43 CORE_LINK="$CORE_LINK $IPO"
44 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
49 # optimize for Pentium and Athlon
50 CPU_OPT="-march=pentium"
54 # optimize for Pentium Pro, Pentium II and Pentium III
55 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro"
59 # optimize for Pentium 4, default
60 CPU_OPT="-march=pentium4"
64 CFLAGS="$CFLAGS $CPU_OPT"
66 if [ ".$PCRE_OPT" = "." ]; then
67 PCRE_OPT="-O $IPO $CPU_OPT"
70 if [ ".$MD5_OPT" = "." ]; then
71 MD5_OPT="-O $IPO $CPU_OPT"
74 if [ ".$ZLIB_OPT" = "." ]; then
75 ZLIB_OPT="-O $IPO $CPU_OPT"
83 # disable some warnings
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"
91 # the format string ends before this argument
92 CFLAGS="$CFLAGS -wd268"
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"
99 # attribute "unused" is only allowed in a function definition, warning on pTHX_
100 CFLAGS="$CFLAGS -wd1301"
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"
114 case "$NGX_ICC_VER" in
116 # "cc" clobber ignored, warnings for Liunx's htonl()/htons()
117 CFLAGS="$CFLAGS -wd1469"
118 # explicit conversion of a 64-bit integral type to a smaller
120 CFLAGS="$CFLAGS -wd1683"
121 # conversion from pointer to same-sized integral type,
122 # warning on offsetof()
123 CFLAGS="$CFLAGS -wd1684"
124 # floating-point equality and inequality comparisons are unreliable,
125 # warning on SvTRUE()
126 CFLAGS="$CFLAGS -wd1572"
130 # "cc" clobber ignored, warnings for Liunx's htonl()/htons()
131 CFLAGS="$CFLAGS -wd1469"
132 # floating-point equality and inequality comparisons are unreliable,
133 # warning on SvTRUE()
134 CFLAGS="$CFLAGS -wd1572"
142 CFLAGS="$CFLAGS -Werror"