[dpdk-dev] [PATCH 4/6] build: MinGW-w64 support for Meson

Thomas Monjalon thomas at monjalon.net
Wed Feb 5 01:41:24 CET 2020


05/02/2020 00:21, Dmitry Kozlyuk:
> > 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?

FIXME: use cc.get_linker_id() with Meson >= 0.54


> > > +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 [0]. 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.
> 
> [0]:
> https://docs.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers

OK, thanks.
Please reword the comment with something like
	"Minimum supported API is Windows 7."





More information about the dev mailing list