Return to icc CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / nginx / auto / cc |
1.1 ! misho 1: ! 2: # Copyright (C) Igor Sysoev ! 3: # Copyright (C) Nginx, Inc. ! 4: ! 5: ! 6: # Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1 ! 7: ! 8: NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \ ! 9: | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'` ! 10: ! 11: echo " + icc version: $NGX_ICC_VER" ! 12: ! 13: have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define ! 14: ! 15: ! 16: # optimizations ! 17: ! 18: CFLAGS="$CFLAGS -O" ! 19: ! 20: CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" ! 21: ! 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 $CPU_OPT" ! 44: fi ! 45: ! 46: if [ ".$MD5_OPT" = "." ]; then ! 47: MD5_OPT="-O $CPU_OPT" ! 48: fi ! 49: ! 50: if [ ".$ZLIB_OPT" = "." ]; then ! 51: ZLIB_OPT="-O $CPU_OPT" ! 52: fi ! 53: ! 54: ! 55: # warnings ! 56: ! 57: CFLAGS="$CFLAGS -w2" ! 58: ! 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" ! 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" ! 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" ! 89: ! 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: ;; ! 104: ! 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: ;; ! 112: ! 113: *) ! 114: ;; ! 115: esac ! 116: ! 117: # stop on warning ! 118: CFLAGS="$CFLAGS -Werror" ! 119: ! 120: # debug ! 121: CFLAGS="$CFLAGS -g"