[dpdk-dev] [PATCH v6 9/9] build: generate version.map file for MingW on Windows
Dmitry Kozlyuk
dmitry.kozliuk at gmail.com
Sat Jun 20 20:54:34 CEST 2020
[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