mbox series

[v4,0/7] MinGW-w64 support

Message ID 20200227042537.187459-1-dmitry.kozliuk@gmail.com (mailing list archive)
Headers
Series MinGW-w64 support |

Message

Dmitry Kozlyuk Feb. 27, 2020, 4:25 a.m. UTC
  This patch series add support for building DPDK using MinGW-w64.

MinGW-w64 provides GNU toolchain and independent platform SDK on
Windows. It also supports cross-compilation to Windows from POSIX
systems by providing cross tollchains and libraries [0]. It does NOT
emulate a full POSIX environment, like Cygwin or MSYS do.

There are advantages in using MinGW-w64 in addition to Clang:

1. Cross-compilation out-of-the-box. MinGW-w64 is provides a pthread
   implementation, GNU getopt, and Windows platform SDK.

2. Easier porting of POSIX applications using DPDK to Windows, because
   application code can use the same benefits as mentioned above.

3. Having both primary compilers enabled on Windows provides more
   diagnostics and generally prevents non-portable code.

[0]: http://mingw-w64.org

v4 Changes:

    Fix Windows headers include case.
    Recommend the latest Meson in docs (build fixed with 0.53.2).

v3 Changes:

    Rebase onto the latest Windows EAL.
    Prevent format attribute conflict with upcoming v20.05 patches.
    Remove redundant CFLAGS from Meson.
    Remove links to Meson bugtracker from docs (PR merged into upstream).
    Fix Clang warnings using about GNU options.

v2 Changes:

    Add patch to use lowercase system header filenames.
    Move Meson cross-file for x86 to arch directory.
    Change wording in comments.
    Add Meson version warning in documentation.

Dmitry Kozlyuk (7):
  eal: introduce portable format attribute
  eal/windows: use lowercase filenames for system headers
  eal/windows: support builing with MinGW-w64
  build: MinGW-w64 support for Meson
  build: add cross-file for MinGW-w64
  doc: guide for Windows build using MinGW-w64
  build: fix linker warnings with Clang on Windows

 config/meson.build                           | 26 ++++++--
 config/x86/meson_mingw.txt                   | 13 ++++
 doc/guides/windows_gsg/build_dpdk.rst        | 62 +++++++++++++++++---
 lib/librte_cmdline/cmdline.h                 |  4 +-
 lib/librte_eal/common/include/rte_common.h   | 17 +++++-
 lib/librte_eal/common/include/rte_debug.h    |  2 +-
 lib/librte_eal/common/include/rte_devargs.h  |  2 +-
 lib/librte_eal/common/include/rte_log.h      |  4 +-
 lib/librte_eal/meson.build                   |  3 +
 lib/librte_eal/windows/eal/eal.c             |  6 +-
 lib/librte_eal/windows/eal/include/getopt.h  |  4 ++
 lib/librte_eal/windows/eal/include/pthread.h |  2 +-
 lib/librte_eal/windows/eal/include/rte_os.h  |  6 +-
 lib/meson.build                              |  8 ++-
 14 files changed, 133 insertions(+), 26 deletions(-)
 create mode 100644 config/x86/meson_mingw.txt
  

Comments

William Tu March 11, 2020, 5:22 p.m. UTC | #1
On Wed, Feb 26, 2020 at 8:25 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> This patch series add support for building DPDK using MinGW-w64.
>
> MinGW-w64 provides GNU toolchain and independent platform SDK on
> Windows. It also supports cross-compilation to Windows from POSIX
> systems by providing cross tollchains and libraries [0]. It does NOT
> emulate a full POSIX environment, like Cygwin or MSYS do.
>
> There are advantages in using MinGW-w64 in addition to Clang:
>
> 1. Cross-compilation out-of-the-box. MinGW-w64 is provides a pthread
>    implementation, GNU getopt, and Windows platform SDK.
>
> 2. Easier porting of POSIX applications using DPDK to Windows, because
>    application code can use the same benefits as mentioned above.
>
> 3. Having both primary compilers enabled on Windows provides more
>    diagnostics and generally prevents non-portable code.
>
> [0]: http://mingw-w64.org
>
> v4 Changes:
>
>     Fix Windows headers include case.
>     Recommend the latest Meson in docs (build fixed with 0.53.2).
>
> v3 Changes:
>
>     Rebase onto the latest Windows EAL.
>     Prevent format attribute conflict with upcoming v20.05 patches.
>     Remove redundant CFLAGS from Meson.
>     Remove links to Meson bugtracker from docs (PR merged into upstream).
>     Fix Clang warnings using about GNU options.
>
> v2 Changes:
>
>     Add patch to use lowercase system header filenames.
>     Move Meson cross-file for x86 to arch directory.
>     Change wording in comments.
>     Add Meson version warning in documentation.
>
> Dmitry Kozlyuk (7):
>   eal: introduce portable format attribute
>   eal/windows: use lowercase filenames for system headers
>   eal/windows: support builing with MinGW-w64
>   build: MinGW-w64 support for Meson
>   build: add cross-file for MinGW-w64
>   doc: guide for Windows build using MinGW-w64
>   build: fix linker warnings with Clang on Windows
>
>  config/meson.build                           | 26 ++++++--
>  config/x86/meson_mingw.txt                   | 13 ++++
>  doc/guides/windows_gsg/build_dpdk.rst        | 62 +++++++++++++++++---
>  lib/librte_cmdline/cmdline.h                 |  4 +-
>  lib/librte_eal/common/include/rte_common.h   | 17 +++++-
>  lib/librte_eal/common/include/rte_debug.h    |  2 +-
>  lib/librte_eal/common/include/rte_devargs.h  |  2 +-
>  lib/librte_eal/common/include/rte_log.h      |  4 +-
>  lib/librte_eal/meson.build                   |  3 +
>  lib/librte_eal/windows/eal/eal.c             |  6 +-
>  lib/librte_eal/windows/eal/include/getopt.h  |  4 ++
>  lib/librte_eal/windows/eal/include/pthread.h |  2 +-
>  lib/librte_eal/windows/eal/include/rte_os.h  |  6 +-
>  lib/meson.build                              |  8 ++-
>  14 files changed, 133 insertions(+), 26 deletions(-)
>  create mode 100644 config/x86/meson_mingw.txt
>
I reviewed and tested the v4 series and everything works ok.

Tested-by: William Tu <u9012063@gmail.com>

Thanks
  
Kadam, Pallavi March 11, 2020, 10:36 p.m. UTC | #2
On 2/26/2020 8:25 PM, Dmitry Kozlyuk wrote:
> This patch series add support for building DPDK using MinGW-w64.
> 
> MinGW-w64 provides GNU toolchain and independent platform SDK on
> Windows. It also supports cross-compilation to Windows from POSIX
> systems by providing cross tollchains and libraries [0]. It does NOT
> emulate a full POSIX environment, like Cygwin or MSYS do.
> 
> There are advantages in using MinGW-w64 in addition to Clang:
> 
> 1. Cross-compilation out-of-the-box. MinGW-w64 is provides a pthread
>     implementation, GNU getopt, and Windows platform SDK.
> 
> 2. Easier porting of POSIX applications using DPDK to Windows, because
>     application code can use the same benefits as mentioned above.
> 
> 3. Having both primary compilers enabled on Windows provides more
>     diagnostics and generally prevents non-portable code.
> 
> [0]: http://mingw-w64.org
> 
> v4 Changes:
> 
>      Fix Windows headers include case.
>      Recommend the latest Meson in docs (build fixed with 0.53.2).
> 
> v3 Changes:
> 
>      Rebase onto the latest Windows EAL.
>      Prevent format attribute conflict with upcoming v20.05 patches.
>      Remove redundant CFLAGS from Meson.
>      Remove links to Meson bugtracker from docs (PR merged into upstream).
>      Fix Clang warnings using about GNU options.
> 
> v2 Changes:
> 
>      Add patch to use lowercase system header filenames.
>      Move Meson cross-file for x86 to arch directory.
>      Change wording in comments.
>      Add Meson version warning in documentation.
> 
> Dmitry Kozlyuk (7):
>    eal: introduce portable format attribute
>    eal/windows: use lowercase filenames for system headers
>    eal/windows: support builing with MinGW-w64
>    build: MinGW-w64 support for Meson
>    build: add cross-file for MinGW-w64
>    doc: guide for Windows build using MinGW-w64
>    build: fix linker warnings with Clang on Windows
> 
>   config/meson.build                           | 26 ++++++--
>   config/x86/meson_mingw.txt                   | 13 ++++
>   doc/guides/windows_gsg/build_dpdk.rst        | 62 +++++++++++++++++---
>   lib/librte_cmdline/cmdline.h                 |  4 +-
>   lib/librte_eal/common/include/rte_common.h   | 17 +++++-
>   lib/librte_eal/common/include/rte_debug.h    |  2 +-
>   lib/librte_eal/common/include/rte_devargs.h  |  2 +-
>   lib/librte_eal/common/include/rte_log.h      |  4 +-
>   lib/librte_eal/meson.build                   |  3 +
>   lib/librte_eal/windows/eal/eal.c             |  6 +-
>   lib/librte_eal/windows/eal/include/getopt.h  |  4 ++
>   lib/librte_eal/windows/eal/include/pthread.h |  2 +-
>   lib/librte_eal/windows/eal/include/rte_os.h  |  6 +-
>   lib/meson.build                              |  8 ++-
>   14 files changed, 133 insertions(+), 26 deletions(-)
>   create mode 100644 config/x86/meson_mingw.txt
> 
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
  
Thomas Monjalon March 18, 2020, 12:24 a.m. UTC | #3
11/03/2020 18:22, William Tu:
> On Wed, Feb 26, 2020 at 8:25 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> >
> > This patch series add support for building DPDK using MinGW-w64.
> >
> > MinGW-w64 provides GNU toolchain and independent platform SDK on
> > Windows. It also supports cross-compilation to Windows from POSIX
> > systems by providing cross tollchains and libraries [0]. It does NOT
> > emulate a full POSIX environment, like Cygwin or MSYS do.
> >
> > There are advantages in using MinGW-w64 in addition to Clang:
> >
> > 1. Cross-compilation out-of-the-box. MinGW-w64 is provides a pthread
> >    implementation, GNU getopt, and Windows platform SDK.
> >
> > 2. Easier porting of POSIX applications using DPDK to Windows, because
> >    application code can use the same benefits as mentioned above.
> >
> > 3. Having both primary compilers enabled on Windows provides more
> >    diagnostics and generally prevents non-portable code.
> >
> > [0]: http://mingw-w64.org
> >
[..]
> > Dmitry Kozlyuk (7):
> >   eal: introduce portable format attribute
> >   eal/windows: use lowercase filenames for system headers
> >   eal/windows: support builing with MinGW-w64
> >   build: MinGW-w64 support for Meson
> >   build: add cross-file for MinGW-w64
> >   doc: guide for Windows build using MinGW-w64
> >   build: fix linker warnings with Clang on Windows
> 
> I reviewed and tested the v4 series and everything works ok.
> 
> Tested-by: William Tu <u9012063@gmail.com>

The doc patch was split and squashed in relevant commits.

Applied, thanks