Mercurial > hg > nginx
annotate auto/cc/icc @ 5980:ccad84a174e0
Refactored sendfile() AIO preload.
This reduces layering violation and simplifies the logic of AIO preread, since
it's now triggered by the send chain function itself without falling back to
the copy filter. The context of AIO operation is now stored per file buffer,
which makes it possible to properly handle cases when multiple buffers come
from different locations, each with its own configuration.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 11 Feb 2015 17:52:15 +0300 |
parents | d620f497c50f |
children | 293413010217 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
6 # Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1 |
455 | 7 |
521 | 8 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \ |
1170
5e878722ad57
remove trailing space in icc version
Igor Sysoev <igor@sysoev.ru>
parents:
681
diff
changeset
|
9 | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'` |
521 | 10 |
11 echo " + icc version: $NGX_ICC_VER" | |
12 | |
557 | 13 have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define |
14 | |
521 | 15 |
455 | 16 # optimizations |
17 | |
18 CFLAGS="$CFLAGS -O" | |
19 | |
469 | 20 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" |
455 | 21 |
573 | 22 |
455 | 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 | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
43 PCRE_OPT="-O $CPU_OPT" |
455 | 44 fi |
45 | |
46 if [ ".$MD5_OPT" = "." ]; then | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
47 MD5_OPT="-O $CPU_OPT" |
455 | 48 fi |
49 | |
50 if [ ".$ZLIB_OPT" = "." ]; then | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
51 ZLIB_OPT="-O $CPU_OPT" |
455 | 52 fi |
53 | |
54 | |
55 # warnings | |
56 | |
501 | 57 CFLAGS="$CFLAGS -w2" |
58 | |
59 # disable some warnings | |
455 | 60 |
501 | 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" | |
563 | 67 # the format string ends before this argument |
519 | 68 CFLAGS="$CFLAGS -wd268" |
501 | 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" | |
681 | 75 # attribute "unused" is only allowed in a function definition, warning on pTHX_ |
76 CFLAGS="$CFLAGS -wd1301" | |
501 | 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" | |
521 | 89 |
90 case "$NGX_ICC_VER" in | |
573 | 91 9.*) |
577 | 92 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
521 | 93 CFLAGS="$CFLAGS -wd1469" |
563 | 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" | |
595 | 100 # floating-point equality and inequality comparisons are unreliable, |
101 # warning on SvTRUE() | |
102 CFLAGS="$CFLAGS -wd1572" | |
521 | 103 ;; |
104 | |
573 | 105 8.*) |
577 | 106 # "cc" clobber ignored, warnings for Liunx's htonl()/htons() |
573 | 107 CFLAGS="$CFLAGS -wd1469" |
595 | 108 # floating-point equality and inequality comparisons are unreliable, |
109 # warning on SvTRUE() | |
110 CFLAGS="$CFLAGS -wd1572" | |
573 | 111 ;; |
112 | |
521 | 113 *) |
114 ;; | |
115 esac | |
479 | 116 |
455 | 117 # stop on warning |
118 CFLAGS="$CFLAGS -Werror" | |
119 | |
120 # debug | |
121 CFLAGS="$CFLAGS -g" |