[dpdk-dev] [PATCH v6 9/9] build: generate version.map file for MingW on Windows

Tal Shnaiderman talshn at mellanox.com
Sun Jun 21 07:49:09 CEST 2020


Thanks Dmitry,

Using libname is the correct way in drivers/meson.build.
I'll modify lib/meson.build to use libname for consistency.

> -----Original Message-----
> From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Sent: Saturday, June 20, 2020 9:55 PM
> To: Tal Shnaiderman <talshn at mellanox.com>
> Cc: dev at dpdk.org; Thomas Monjalon <thomas at monjalon.net>;
> pallavi.kadam at intel.com; david.marchand at redhat.com; grive at u256.net;
> ranjit.menon at intel.com; navasile at linux.microsoft.com;
> harini.ramakrishnan at microsoft.com; ocardona at microsoft.com;
> anatoly.burakov at intel.com; Fady Bader <fady at mellanox.com>;
> bruce.richardson at intel.com
> Subject: Re: [PATCH v6 9/9] build: generate version.map file for MingW on
> Windows
> 
> [snip]
> > diff --git a/drivers/meson.build b/drivers/meson.build index
> > 646a7d5eb5..b25a368531 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -152,16 +152,22 @@ foreach class:dpdk_driver_classes
> >  			implib = 'lib' + lib_name + '.dll.a'
> >
> >  			def_file = custom_target(lib_name + '_def',
> > -				command: [map_to_def_cmd, '@INPUT@',
> '@OUTPUT@'],
> > +				command: [map_to_win_cmd, '@INPUT@',
> '@OUTPUT@'],
> >  				input: version_map,
> >  				output:
> '@0 at _exports.def'.format(lib_name))
> > -			lk_deps = [version_map, def_file]
> > +
> > +			mingw_map = custom_target(name + '_mingw',
> > +				command: [map_to_win_cmd, '@INPUT@',
> '@OUTPUT@'],
> > +				input: version_map,
> > +				output: '@0 at _mingw.map'.format(name))
> 
> Hit the following error while building a Linux-targeted DPDK:
> 
> drivers/meson.build:159:3: ERROR: Tried to create target "dpaa_mingw", but
> a target of that name already exists.
> 
> Probably you need "lib_name" instead of "name" or just to disable the target
> for non-Windows builds.
> 
> > +
> > +			lk_deps = [version_map, def_file, mingw_map]
> >  			if is_windows
> >  				if is_ms_linker
> >  					lk_args = ['-Wl,/def:' +
> def_file.full_path(),
> >  						'-Wl,/implib:drivers\\' +
> implib]
> >  				else
> > -					lk_args = []
> > +					lk_args = ['-Wl,--version-script=' +
> mingw_map.full_path()]
> >  				endif
> >  			else
> >  				lk_args = ['-Wl,--version-script=' +
> version_map] diff --git
> > a/lib/meson.build b/lib/meson.build index a8fd317a18..9f6c85a3e1
> > 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -150,18 +150,27 @@ foreach l:libraries
> >  			implib = dir_name + '.dll.a'
> >
> >  			def_file = custom_target(name + '_def',
> > -				command: [map_to_def_cmd, '@INPUT@',
> '@OUTPUT@'],
> > +				command: [map_to_win_cmd, '@INPUT@',
> '@OUTPUT@'],
> >  				input: version_map,
> >  				output:
> 'rte_ at 0@_exports.def'.format(name))
> >
> > +			mingw_map = custom_target(name + '_mingw',
> > +				command: [map_to_win_cmd, '@INPUT@',
> '@OUTPUT@'],
> > +				input: version_map,
> > +				output:
> 'rte_ at 0@_mingw.map'.format(name))
> > +
> 
> See above on name/lib_name. Maybe it's technically irrelevant here, but
> better use consistent name generation code.
> 
> --
> Dmitry Kozlyuk


More information about the dev mailing list