Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 1 | |
| 2 | # Copyright (C) Igor Sysoev |
| 3 | |
| 4 | |
Igor Sysoev | d039a2e | 2005-02-22 14:40:13 +0000 | [diff] [blame] | 5 | # Intel C++ compiler 7.1, 8.0, 8.1 |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 6 | |
| 7 | # optimizations |
| 8 | |
| 9 | CFLAGS="$CFLAGS -O" |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 10 | # inline the functions declared with __inline |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 11 | #CFLAGS="$CFLAGS -Ob1" |
| 12 | # inline any function, at the compiler's discretion |
| 13 | CFLAGS="$CFLAGS -Ob2" |
| 14 | |
| 15 | # single-file IP optimizations |
| 16 | #IPO="-ip" |
| 17 | # multi-file IP optimizations |
| 18 | IPO="-ipo -ipo_obj" |
| 19 | CFLAGS="$CFLAGS $IPO" |
| 20 | CORE_LINK="$CORE_LINK $IPO" |
Igor Sysoev | f690604 | 2004-11-25 16:17:31 +0000 | [diff] [blame] | 21 | CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 22 | |
| 23 | case $CPU in |
| 24 | pentium) |
| 25 | # optimize for Pentium and Athlon |
| 26 | CPU_OPT="-march=pentium" |
| 27 | ;; |
| 28 | |
| 29 | pentiumpro) |
| 30 | # optimize for Pentium Pro, Pentium II and Pentium III |
| 31 | CPU_OPT="-mcpu=pentiumpro -march=pentiumpro" |
| 32 | ;; |
| 33 | |
| 34 | pentium4) |
| 35 | # optimize for Pentium 4, default |
| 36 | CPU_OPT="-march=pentium4" |
| 37 | ;; |
| 38 | esac |
| 39 | |
| 40 | CFLAGS="$CFLAGS $CPU_OPT" |
| 41 | |
| 42 | if [ ".$PCRE_OPT" = "." ]; then |
| 43 | PCRE_OPT="-O $IPO $CPU_OPT" |
| 44 | fi |
| 45 | |
| 46 | if [ ".$MD5_OPT" = "." ]; then |
| 47 | MD5_OPT="-O $IPO $CPU_OPT" |
| 48 | fi |
| 49 | |
| 50 | if [ ".$ZLIB_OPT" = "." ]; then |
| 51 | ZLIB_OPT="-O $IPO $CPU_OPT" |
| 52 | fi |
| 53 | |
| 54 | |
| 55 | # warnings |
| 56 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 57 | CFLAGS="$CFLAGS -w2" |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 58 | |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 59 | # disable some warnings |
| 60 | |
| 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" |
Igor Sysoev | 403d244 | 2005-05-26 18:12:40 +0000 | [diff] [blame] | 67 | #the format string ends before this argument |
| 68 | CFLAGS="$CFLAGS -wd268" |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 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" |
Igor Sysoev | 403d244 | 2005-05-26 18:12:40 +0000 | [diff] [blame] | 75 | # "cc" clobber ignored, warnings for Liunx's htons() |
| 76 | CFLAGS="$CFLAGS -wd1469" |
Igor Sysoev | c157172 | 2005-03-19 12:38:37 +0000 | [diff] [blame] | 77 | |
| 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" |
Igor Sysoev | 403d244 | 2005-05-26 18:12:40 +0000 | [diff] [blame] | 89 | # non-POD class type passed through ellipsis |
| 90 | CFLAGS="$CFLAGS -wd1595" |
Igor Sysoev | 02025fd | 2005-01-18 13:03:58 +0000 | [diff] [blame] | 91 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 92 | # stop on warning |
| 93 | CFLAGS="$CFLAGS -Werror" |
| 94 | |
| 95 | # debug |
| 96 | CFLAGS="$CFLAGS -g" |