Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / cc / icc
blob2c16f30bf80ee37ff7dd9658bede6a97ea06ca27
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
16 # optimizations
18 CFLAGS="$CFLAGS -O"
20 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
23 case $CPU in
24     pentium)
25         # optimize for Pentium and Athlon
26         CPU_OPT="-march=pentium"
27     ;;
29     pentiumpro)
30         # optimize for Pentium Pro, Pentium II and Pentium III
31         CPU_OPT="-mcpu=pentiumpro -march=pentiumpro"
32     ;;
34     pentium4)
35         # optimize for Pentium 4, default
36         CPU_OPT="-march=pentium4"
37     ;;
38 esac
40 CFLAGS="$CFLAGS $CPU_OPT"
42 if [ ".$PCRE_OPT" = "." ]; then
43     PCRE_OPT="-O $CPU_OPT"
46 if [ ".$MD5_OPT" = "." ]; then
47     MD5_OPT="-O $CPU_OPT"
50 if [ ".$ZLIB_OPT" = "." ]; then
51     ZLIB_OPT="-O $CPU_OPT"
55 # warnings
57 CFLAGS="$CFLAGS -w2"
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"
78 # STUB
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
91     9.*)
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
95         # integral type
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"
103     ;;
105     8.*)
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"
111     ;;
113     *)
114     ;;
115 esac
117 # stop on warning
118 CFLAGS="$CFLAGS"
120 # debug
121 CFLAGS="$CFLAGS -g"