2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 # Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1
8 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \
9 | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'`
11 echo " + icc version: $NGX_ICC_VER"
13 have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define
20 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
25 # optimize for Pentium and Athlon
26 CPU_OPT="-march=pentium"
30 # optimize for Pentium Pro, Pentium II and Pentium III
31 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro"
35 # optimize for Pentium 4, default
36 CPU_OPT="-march=pentium4"
40 CFLAGS="$CFLAGS $CPU_OPT"
42 if [ ".$PCRE_OPT" = "." ]; then
43 PCRE_OPT="-O $CPU_OPT"
46 if [ ".$MD5_OPT" = "." ]; then
50 if [ ".$ZLIB_OPT" = "." ]; then
51 ZLIB_OPT="-O $CPU_OPT"
59 # disable some warnings
61 # invalid type conversion: "int" to "char *"
62 CFLAGS="$CFLAGS -wd171"
63 # argument is incompatible with corresponding format string conversion
64 CFLAGS="$CFLAGS -wd181"
65 # zero used for undefined preprocessing identifier
66 CFLAGS="$CFLAGS -wd193"
67 # the format string ends before this argument
68 CFLAGS="$CFLAGS -wd268"
69 # invalid format string conversion
70 CFLAGS="$CFLAGS -wd269"
71 # conversion from "long long" to "size_t" may lose significant bits
72 CFLAGS="$CFLAGS -wd810"
73 # parameter was never referenced
74 CFLAGS="$CFLAGS -wd869"
75 # attribute "unused" is only allowed in a function definition, warning on pTHX_
76 CFLAGS="$CFLAGS -wd1301"
79 # enumerated type mixed with another type
80 CFLAGS="$CFLAGS -wd188"
81 # controlling expression is constant
82 CFLAGS="$CFLAGS -wd279"
83 # operands are evaluated in unspecified order
84 CFLAGS="$CFLAGS -wd981"
85 # external definition with no prior declaration
86 CFLAGS="$CFLAGS -wd1418"
87 # external declaration in primary source file
88 CFLAGS="$CFLAGS -wd1419"
90 case "$NGX_ICC_VER" in
92 # "cc" clobber ignored, warnings for Liunx's htonl()/htons()
93 CFLAGS="$CFLAGS -wd1469"
94 # explicit conversion of a 64-bit integral type to a smaller
96 CFLAGS="$CFLAGS -wd1683"
97 # conversion from pointer to same-sized integral type,
98 # warning on offsetof()
99 CFLAGS="$CFLAGS -wd1684"
100 # floating-point equality and inequality comparisons are unreliable,
101 # warning on SvTRUE()
102 CFLAGS="$CFLAGS -wd1572"
106 # "cc" clobber ignored, warnings for Liunx's htonl()/htons()
107 CFLAGS="$CFLAGS -wd1469"
108 # floating-point equality and inequality comparisons are unreliable,
109 # warning on SvTRUE()
110 CFLAGS="$CFLAGS -wd1572"