[PATCH] Support cross compiling with MinGW-w64 on Debian GNU/Linux

Kouhei Sutou kou at cozmixng.org
Wed Oct 15 12:21:09 UTC 2014


Hi,

In <20141014161135.GM31276 at mdounin.ru>
  "Re: [PATCH] Support cross compiling with MinGW-w64 on Debian GNU/Linux" on Tue, 14 Oct 2014 20:11:36 +0400,
  Maxim Dounin <mdounin at mdounin.ru> wrote:

>> But there is no macro to distinguish MinGW-w64 gcc and MinGW
>> gcc... So I added MGX_MINGW_W64 and MGX_MINGW macros by
>> auto/define and use ngx_auto_config.h in ngx_win32_config.h.
>> 
>> How do you think about this approach?
> 
> It doesn't look like a good approach for me.

OK. I use another approach.

I add only 64bit version MinGW-w64 GCC support. We can
distinguish 64bit version MinGW-w64 GCC by the following
expression:

  defined(__GNUC__) && defined(_WIN64)


Here is a summary of GCC support for Windows build:

The current code base (without patch):

  * MinGW GCC: Supported
  * MinGW-w64 GCC (32bit): Not supported
  * MinGW-w64 GCC (64bit): Not supported

With the previous patch (rejected approach):

  * MinGW GCC: Supported
  * MinGW-w64 GCC (32bit): Supported
  * MinGW-w64 GCC (64bit): Supported

With the attached patch:

  * MinGW GCC: Supported
  * MinGW-w64 GCC (32bit): Not supported
  * MinGW-w64 GCC (64bit): Supported


Could you review it?


Thanks,
--
kou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32-made-build-able-with-64bit-version-mingw-w64-v4.patch
Type: text/x-patch
Size: 7962 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20141015/d6409820/attachment.bin>


More information about the nginx-devel mailing list