Commit Graph

140 Commits

Author SHA1 Message Date
Maxim Dounin 9612c3c394 Win32: OpenSSL compilation for x64 targets with MSVC.
To ensure proper target selection the NGX_MACHINE variable is now set
based on the MSVC compiler output, and the OpenSSL target is set based
on it.

This is not important as long as "no-asm" is used (as in misc/GNUmakefile
and win32 build instructions), but might be beneficial if someone is trying
to build OpenSSL with assembler code.
2023-02-23 18:16:08 +03:00
Maxim Dounin 54bd67eb92 Win32: handling of localized MSVC cl output.
Output examples in English, Russian, and Spanish:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Оптимизирующий 32-разрядный компилятор Microsoft (R) C/C++ версии 16.00.30319.01 для 80x86
Compilador de optimización de C/C++ de Microsoft (R) versión 16.00.30319.01 para x64

Since most of the words are translated, instead of looking for the words
"Compiler Version" we now search for "C/C++" and the version number.
2023-02-23 18:15:57 +03:00
Maxim Dounin f8ea58861b Win32: removed unneeded wildcard in NGX_CC_NAME test for msvc.
Wildcards for msvc in NGX_CC_NAME tests are not needed since 78f8ac479735.
2023-02-23 18:15:53 +03:00
Maxim Dounin 416007f036 Win32: defined pdb path.
By default, MSVC uses vc<version>.pdb in the current directory.
With the "-Fd" switch it is directed to be in the objs directory instead.
2019-04-04 19:30:47 +03:00
Ruslan Ermilov 9841e24637 Configure: fixed clang version detection (closes #1539).
While 325b3042edd6 fixed it on MINIX, it broke it on systems
that output the word "version" on several lines with "cc -v".
The fix is to only consider "clang version" or "LLVM version"
as clang version, but this time only using sed(1).
2018-04-24 14:04:59 +03:00
Maxim Dounin 0172d71f96 Configure: fixed clang detection on MINIX.
As per POSIX, basic regular expressions have no alternations, and the
interpretation of the "\|" construct is undefined.  At least on MINIX
and Solaris grep interprets "\|" as literal "|", and not as an alternation
as GNU grep does.  Removed such constructs introduced in f1daa0356a1d.
This fixes clang detection on MINIX.
2017-11-23 16:33:40 +03:00
Orgad Shaneh e6d91784f4 Configure: use .exe for binaries for all win32 compilers. 2017-06-06 19:37:34 +03:00
Maxim Dounin 42c3f10fe8 Configure: recent Sun C versions. 2017-05-15 20:09:44 +03:00
Maxim Dounin be7d7499e5 Configure: disabled gcc atomics with Sun C (ticket #1261).
Oracle Developer Studio 12.5 introduced GCC-compatible __sync builtins.
Unfortunately, these builtins are neither GCC-compatible (they generate
warnings when used with volatile), nor working (unexpectedly fail on
unpredictable combinations of code layout and compiler flags).  As such,
the gcc builtin atomic operations configure test explicitly disabled when
compiling with Sun C.
2017-05-15 20:09:43 +03:00
Maxim Dounin 2cabd63422 Configure: style. 2017-05-15 20:09:40 +03:00
Piotr Sikora aeeafbe0ca Configure: fix build with -Werror=old-style-definition.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-06-27 15:00:05 -07:00
Piotr Sikora a76563bce2 Configure: fix build with -Werror=unused-value.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-06-27 15:00:02 -07:00
Maxim Dounin 44313caee5 Internal md5 and sha1 implementations are now always used.
This reduces the number of moving parts in ABI compatibility checks.
Additionally, it also allows to use OpenSSL in FIPS mode while still
using md5 for non-security tasks.
2016-06-30 18:57:39 +03:00
Sergey Kandaurov aa86ee53b5 Configure: revised GCC version processing.
Now GCC 6 and onwards will use -Wno-unused-parameter.
2016-06-07 12:15:56 +03:00
Josh Soref 0ad1149053 Fixed spelling. 2016-04-07 11:50:13 +03:00
Maxim Dounin a57c77bd5e Win32: simplified and improved handling of MSVC versions.
Now we always set NGX_CC_NAME to "msvc", and additionally test compiler
version as reported by "cl" in auto/cc/msvc (the same version is also
available via the _MSC_VER define).  In particular, this approach allows
to properly check for C99 variadic macros support, which previously was
not used with MSVC versions not explicitly recognized.

Now unneeded wildcards in NGX_CC_NAME tests for msvc removed accordingly,
as well as unused wildcards for owc and icc.
2016-02-13 06:47:34 +03:00
Valentin Bartenev 63f3238ef8 HTTP/2: implemented HPACK Huffman encoding for response headers.
This reduces the size of headers by over 30% on average.

Based on the patch by Vlad Krasnov:
http://mailman.nginx.org/pipermail/nginx-devel/2015-December/007682.html
2016-02-11 15:35:36 +03:00
Maxim Dounin f3e79434f5 Dynamic modules.
The auto/module script is extended to understand ngx_module_link=DYNAMIC.
When set, it links the module as a shared object rather than statically
into nginx binary.  The module can later be loaded using the "load_module"
directive.

New auto/module parameter ngx_module_order allows to define module loading
order in complex cases.  By default the order is set based on ngx_module_type.

3rd party modules can be compiled dynamically using the --add-dynamic-module
configure option, which will preset ngx_module_link to "DYNAMIC" before
calling the module config script.

Win32 support is rudimentary, and only works when using MinGW gcc (which
is able to handle exports/imports automatically).

In collaboration with Ruslan Ermilov.
2016-02-04 20:25:29 +03:00
Valentin Bartenev 6a771704df Configure: added gcc5 to the list of known GCC versions. 2015-06-10 19:18:20 +03:00
Maxim Dounin 109beffc45 Configure: added -Wno-deprecated-declarations on OS X.
Previous workaround to avoid warnings on OS X due to deprecated system
OpenSSL library (introduced in a3870ea96ccd) no longer works, as
the MAC_OS_X_VERSION_MIN_REQUIRED macro is ignored on OS X 10.9
if a compiler used supports __attribute__(availability).
2014-05-28 17:41:44 +04:00
Maxim Dounin a19c448939 Win32: fixed link flags with MSVC, broken by bfe536716dbf.
Notably, "-debug" was omitted, resulting in an executable without debug
symbols.
2014-04-07 18:29:05 +04:00
Maxim Dounin b0d01ba522 Win32: MSVC 2013 compatibility.
Warnings about GetVersionEx() deprecation silenced.  Precompiled object
linked in.
2014-02-13 16:54:00 +04:00
Ruslan Ermilov e3242cbdb1 Configure: enabled -Werror for clang.
Modern clang versions seem to no longer produce warnings for
system headers on Linux (at least clang 3.3 works), hence the
change.  For older versions --with-cc-opt="-Wno-error" can be
used as a workaround.
2014-01-28 00:31:31 +04:00
Ruslan Ermilov 97ef1e5308 Configure: enable -Wconditional-uninitialized with clang. 2013-12-06 13:16:56 +04:00
Maxim Dounin bcfe2e80bb Configure: fixed building with Sun C if CFLAGS set (ticket #65). 2013-09-04 21:17:03 +04:00
Maxim Dounin 8c6d551127 Win32: Open Watcom C compatibility fixes.
Precompiled headers are disabled as they lead to internal compiler errors
with long configure lines.  Couple of false positive warnings silenced.
Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers.

With this patch, it's now again possible to compile nginx using owc386,
with options we normally compile on win32 minus ipv6 and ssl.
2013-09-04 20:48:22 +04:00
Sergey Kandaurov 393529a9d3 Configure: fixed autotest cleanup commands.
Previously, if configured with --with-cc="clang -g", the autotest.dSYM
directories were left unremoved.
2013-07-31 18:16:40 +04:00
Ruslan Ermilov f5bde9d067 Configure: fixed detection of newer Apple clang compilers. 2013-04-29 18:07:22 +04:00
Sergey Budnevitch 5875127661 Removed redundant variable assignment. 2013-01-21 15:05:54 +00:00
Ruslan Ermilov c4fa6e1a31 Removed extraneous GCC warning flags. 2012-07-29 19:45:30 +00:00
Ruslan Ermilov a8ba779147 Added the Clang compiler support.
The -Werror is commented out to not break builds on Linux.
2012-07-24 15:17:03 +00:00
Ruslan Ermilov 0e5749c2fd Added a commented out -Wmissing-prototypes to CFLAGS.
It is commented out to not break builds with 3rd party modules.
2012-07-24 15:13:34 +00:00
Ruslan Ermilov a6b64ace7a Replaced a number of "else if" with "elif". 2012-07-24 15:00:42 +00:00
Maxim Dounin 4ce9dbd11f Configure: moved icc detection before gcc.
New versions of icc confuse auto/cc/name due to introduced handling
of a "icc -v":

$ icc -v
icc version 12.1.3 (gcc version 4.6.0 compatibility)
$ icc -V
Intel(R) C Compiler XE for applications running on IA-32, Version 12.1.3.293 Build 20120212
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

See report here:
http://mailman.nginx.org/pipermail/nginx/2012-February/032177.html
2012-02-27 16:23:44 +00:00
Maxim Konovalov 0330b7ef84 Copyright updated. 2012-01-18 15:07:43 +00:00
Maxim Konovalov 8eb05fbc39 Some questionable optomizations flags for icc were removed
in order to simplify support of its future versions.
2011-12-29 15:36:07 +00:00
Igor Sysoev 85bd9c3bff Fix of building by Microsoft Visual C++ 10 compiler. 2011-10-26 08:16:59 +00:00
Maxim Dounin d8a0ae2edb Lower optimization level for Sun Studio before 12.1.
At least Sun Studio 12 has problems with bit-fields exposed by nginx code
(caught by test suite).  They seems to be fixed in Sun Studio 12.1.  As a
workaround use "-fast -xalias_level=any" for older versions, it resolves
the problem.
2011-08-18 15:10:23 +00:00
Igor Sysoev df89ec501a try to use C99 variadic macros first:
AIX 5.3's XL C has problems with GCC style variadic macros
2010-07-05 13:02:25 +00:00
Igor Sysoev 90fbee3778 do not add NGX_GCC_OPT twice: it is added later with -W 2009-12-21 17:51:30 +00:00
Igor Sysoev 36f3d115fc test invalid --with-ld-opt in right place 2009-11-27 22:02:04 +00:00
Igor Sysoev c4cf77686e atomic operations test-run 2009-11-27 22:00:39 +00:00
Igor Sysoev e43dac2e19 GCC 4.1 builtin atomic operations 2009-11-25 17:34:35 +00:00
Igor Sysoev bcacef7f18 use tab in Makefile 2009-05-28 14:33:37 +00:00
Igor Sysoev 71cf32439f add miltilines in OpenWatcom makefiles 2009-05-12 13:29:00 +00:00
Igor Sysoev 123db90851 remove BMAKE (build make): a cc compiler should use own make 2009-05-10 18:35:08 +00:00
Igor Sysoev a3e783a0de preserve Solaris binary hardware capabilities 2009-05-08 09:41:43 +00:00
Igor Sysoev 0aa44a8c2a update gcc warnings 2009-04-24 15:31:13 +00:00
Igor Sysoev 783a4563b5 Win32 master/workers model 2009-04-20 06:08:47 +00:00
Igor Sysoev 65ff46961d add variadic macros support for msvc8 2009-04-19 16:25:02 +00:00