blob: a0f676e6df0f6dc379cc4fc88cdae2d2075cab6a [file] [log] [blame]
Igor Sysoevc0edbcc2004-10-21 15:34:38 +00001
2# Copyright (C) Igor Sysoev
3
4
Igor Sysoevd039a2e2005-02-22 14:40:13 +00005# Intel C++ compiler 7.1, 8.0, 8.1
Igor Sysoevc0edbcc2004-10-21 15:34:38 +00006
7# optimizations
8
9CFLAGS="$CFLAGS -O"
Igor Sysoevc1571722005-03-19 12:38:37 +000010# inline the functions declared with __inline
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000011#CFLAGS="$CFLAGS -Ob1"
12# inline any function, at the compiler's discretion
13CFLAGS="$CFLAGS -Ob2"
14
15# single-file IP optimizations
16#IPO="-ip"
17# multi-file IP optimizations
18IPO="-ipo -ipo_obj"
19CFLAGS="$CFLAGS $IPO"
20CORE_LINK="$CORE_LINK $IPO"
Igor Sysoevf6906042004-11-25 16:17:31 +000021CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000022
23case $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 ;;
38esac
39
40CFLAGS="$CFLAGS $CPU_OPT"
41
42if [ ".$PCRE_OPT" = "." ]; then
43 PCRE_OPT="-O $IPO $CPU_OPT"
44fi
45
46if [ ".$MD5_OPT" = "." ]; then
47 MD5_OPT="-O $IPO $CPU_OPT"
48fi
49
50if [ ".$ZLIB_OPT" = "." ]; then
51 ZLIB_OPT="-O $IPO $CPU_OPT"
52fi
53
54
55# warnings
56
Igor Sysoevc1571722005-03-19 12:38:37 +000057CFLAGS="$CFLAGS -w2"
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000058
Igor Sysoevc1571722005-03-19 12:38:37 +000059# disable some warnings
60
61# invalid type conversion: "int" to "char *"
62CFLAGS="$CFLAGS -wd171"
63# argument is incompatible with corresponding format string conversion
64CFLAGS="$CFLAGS -wd181"
65# zero used for undefined preprocessing identifier
66CFLAGS="$CFLAGS -wd193"
Igor Sysoev403d2442005-05-26 18:12:40 +000067#the format string ends before this argument
68CFLAGS="$CFLAGS -wd268"
Igor Sysoevc1571722005-03-19 12:38:37 +000069# invalid format string conversion
70CFLAGS="$CFLAGS -wd269"
71# conversion from "long long" to "size_t" may lose significant bits
72CFLAGS="$CFLAGS -wd810"
73# parameter was never referenced
74CFLAGS="$CFLAGS -wd869"
Igor Sysoev403d2442005-05-26 18:12:40 +000075# "cc" clobber ignored, warnings for Liunx's htons()
76CFLAGS="$CFLAGS -wd1469"
Igor Sysoevc1571722005-03-19 12:38:37 +000077
78# STUB
79# enumerated type mixed with another type
80CFLAGS="$CFLAGS -wd188"
81# controlling expression is constant
82CFLAGS="$CFLAGS -wd279"
83# operands are evaluated in unspecified order
84CFLAGS="$CFLAGS -wd981"
85# external definition with no prior declaration
86CFLAGS="$CFLAGS -wd1418"
87# external declaration in primary source file
88CFLAGS="$CFLAGS -wd1419"
Igor Sysoev403d2442005-05-26 18:12:40 +000089# non-POD class type passed through ellipsis
90CFLAGS="$CFLAGS -wd1595"
Igor Sysoev02025fd2005-01-18 13:03:58 +000091
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000092# stop on warning
93CFLAGS="$CFLAGS -Werror"
94
95# debug
96CFLAGS="$CFLAGS -g"