[dpdk-dev] [PATCH 4/6] build: MinGW-w64 support for Meson
dmitry.kozliuk at gmail.com
Wed Feb 5 00:21:38 CET 2020
> I really like this patch.
> So both GCC (with MinGW) and native clang are supported?
Thanks. Yes, I tested both toolchains.
> > +# MS linker requires special treatment.
> > +# FIXME: use cc.get_linker_id() after upgrading to Meson >=0.53.
> What does it mean? It won't work with meson 0.53?
It will work for any Meson version, I meant that Meson 0.54 will introduce a
better way to determine linker ID. Can you suggest a better wording?
> > +is_ms_linker = is_windows and (cc.get_id() == 'clang')
> > +if is_windows
> > + # Require platform SDK for Windows 7 and above.
> > + add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c')
> Please explain. Why Windows 7 is needed? What this define is doing?
Yes, Windows 7 and above is need for already existing code in eal_lcore.c,
specifically for GetLogicalProcessorInformation() call.
When including <windows.h>, one must define minimum API version the
application is compiled against . MSVC and Clang default to the version of
platform SDK (that is, maximum supported). MinGW defaults to Windows XP, so
this definition must be either in <rte_os.h> before #include <windows.h> or
here. Because other files may include <windows.h>, I'd prefer to have a
global definition via compiler command-line.
More information about the dev