Mercurial > hg > nginx-quic
annotate auto/cc/icc @ 6862:abb0a4189cf7
Win32: compatiblity with OpenSSL 1.1.0.
OpenSSL 1.1.0 now uses normal "nmake; nmake install" instead of using
custom "ms\do_ms.bat" script and "ms\nt.mak" makefile. And Configure
now requires --prefix to be absolute, and no longer derives --openssldir
from prefix (so it's specified explicitly). Generated libraries are now
called "libcrypto.lib" and "libssl.lib" instead of "libeay32.lib"
and "ssleay32.lib". Appropriate tests added to support both old and new
variants.
Additionally, openssl/lhash.h now triggers warning C4090 ('function' :
different 'const' qualifiers), so the warning was disabled.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 24 Dec 2016 18:01:14 +0300 |
parents | 9eefb38f0005 |
children |
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 [ ".$ZLIB_OPT" = "." ]; then | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
47 ZLIB_OPT="-O $CPU_OPT" |
455 | 48 fi |
49 | |
50 | |
51 # warnings | |
52 | |
501 | 53 CFLAGS="$CFLAGS -w2" |
54 | |
55 # disable some warnings | |
455 | 56 |
501 | 57 # invalid type conversion: "int" to "char *" |
58 CFLAGS="$CFLAGS -wd171" | |
59 # argument is incompatible with corresponding format string conversion | |
60 CFLAGS="$CFLAGS -wd181" | |
61 # zero used for undefined preprocessing identifier | |
62 CFLAGS="$CFLAGS -wd193" | |
563 | 63 # the format string ends before this argument |
519 | 64 CFLAGS="$CFLAGS -wd268" |
501 | 65 # invalid format string conversion |
66 CFLAGS="$CFLAGS -wd269" | |
67 # conversion from "long long" to "size_t" may lose significant bits | |
68 CFLAGS="$CFLAGS -wd810" | |
69 # parameter was never referenced | |
70 CFLAGS="$CFLAGS -wd869" | |
681 | 71 # attribute "unused" is only allowed in a function definition, warning on pTHX_ |
72 CFLAGS="$CFLAGS -wd1301" | |
501 | 73 |
74 # STUB | |
75 # enumerated type mixed with another type | |
76 CFLAGS="$CFLAGS -wd188" | |
77 # controlling expression is constant | |
78 CFLAGS="$CFLAGS -wd279" | |
79 # operands are evaluated in unspecified order | |
80 CFLAGS="$CFLAGS -wd981" | |
81 # external definition with no prior declaration | |
82 CFLAGS="$CFLAGS -wd1418" | |
83 # external declaration in primary source file | |
84 CFLAGS="$CFLAGS -wd1419" | |
521 | 85 |
86 case "$NGX_ICC_VER" in | |
573 | 87 9.*) |
6504 | 88 # "cc" clobber ignored, warnings for Linux's htonl()/htons() |
521 | 89 CFLAGS="$CFLAGS -wd1469" |
563 | 90 # explicit conversion of a 64-bit integral type to a smaller |
91 # integral type | |
92 CFLAGS="$CFLAGS -wd1683" | |
93 # conversion from pointer to same-sized integral type, | |
94 # warning on offsetof() | |
95 CFLAGS="$CFLAGS -wd1684" | |
595 | 96 # floating-point equality and inequality comparisons are unreliable, |
97 # warning on SvTRUE() | |
98 CFLAGS="$CFLAGS -wd1572" | |
521 | 99 ;; |
100 | |
573 | 101 8.*) |
6504 | 102 # "cc" clobber ignored, warnings for Linux's htonl()/htons() |
573 | 103 CFLAGS="$CFLAGS -wd1469" |
595 | 104 # floating-point equality and inequality comparisons are unreliable, |
105 # warning on SvTRUE() | |
106 CFLAGS="$CFLAGS -wd1572" | |
573 | 107 ;; |
108 | |
521 | 109 *) |
110 ;; | |
111 esac | |
479 | 112 |
455 | 113 # stop on warning |
114 CFLAGS="$CFLAGS -Werror" | |
115 | |
116 # debug | |
117 CFLAGS="$CFLAGS -g" |