drivers: remove invalid options for MSVC
Subsystems (2)
PATCH 1/1 drivers: remove invalid options for MSVC
When compiling "drivers" directory with MSVC the errors below popped up:
1)
LINK : warning LNK4044: unrecognized option '/Wl,/def:V:\github\dpdk\build\drivers\rte_bus_vdev_exports.def'; ignored
2)
cl : Command line warning D9002 : ignoring unknown
option '-fno-asynchronous-unwind-tables'
The fix is to remove the unnecessary/invalid option when using MSVC.
--- drivers/meson.build | 6 +++++- drivers/net/intel/i40e/meson.build | 2 +- drivers/net/intel/iavf/meson.build | 2 +- drivers/net/intel/ice/meson.build | 2 +- drivers/net/intel/ixgbe/meson.build | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-)
drivers/meson.build +5 -1
@@ -289,7 +289,11 @@ foreach subpath:subdirs output: '@0@_exports.def'.format(lib_name)) lk_deps += [def_file] - lk_args = ['-Wl,/def:' + def_file.full_path()] + if is_ms_compiler + lk_args = ['/def:' + def_file.full_path()] + else + lk_args = ['-Wl,/def:' + def_file.full_path()] + endif else mingw_map = custom_target(lib_name + '_mingw', command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
drivers/net/intel/i40e/meson.build +1 -1
@@ -41,7 +41,7 @@ includes += include_directories('base') if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif
drivers/net/intel/iavf/meson.build +1 -1
@@ -29,7 +29,7 @@ includes += include_directories('base') if arch_subdir == 'x86' sources += files('iavf_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif
drivers/net/intel/ice/meson.build +1 -1
@@ -35,7 +35,7 @@ endif if arch_subdir == 'x86' sources += files('ice_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif
drivers/net/intel/ixgbe/meson.build +1 -1
@@ -27,7 +27,7 @@ deps += ['hash', 'security'] if arch_subdir == 'x86' sources += files('ixgbe_rxtx_vec_sse.c') sources += files('ixgbe_recycle_mbufs_vec_common.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif elif arch_subdir == 'arm'
Signature · 1 line
2.48.1.vfs.0.1
Quoted 6 lines · Andre Muezerie
When compiling "drivers" directory with MSVC the errors below popped up:
1)
LINK : warning LNK4044: unrecognized option '/Wl,/def:V:\github\dpdk\build\drivers\rte_bus_vdev_exports.def'; ignored
I reworked passing the export map in my RFC series.
Quoted 4 lines
2)
cl : Command line warning D9002 : ignoring unknown
option '-fno-asynchronous-unwind-tables'
This part lgtm.
Quoted 4 lines
The fix is to remove the unnecessary/invalid option when using MSVC.
Signed-off-by Andre Muezerie <[email protected]>
Signature · 1 line
David Marchand
Quoted 10 lines · David Marchand
Quoted 6 lines · Andre Muezerie
When compiling "drivers" directory with MSVC the errors below popped up:
1)
LINK : warning LNK4044: unrecognized option '/Wl,/def:V:\github\dpdk\build\drivers\rte_bus_vdev_exports.def'; ignoredI reworked passing the export map in my RFC series.
That's right. I'll remove this part then.
Quoted 16 lines
Quoted 5 lines
2)
cl : Command line warning D9002 : ignoring unknown
option '-fno-asynchronous-unwind-tables'This part lgtm.
Quoted 4 lines
The fix is to remove the unnecessary/invalid option when using MSVC.
Signed-off-by Andre Muezerie <[email protected]>Signature · 1 line
David Marchand
Quoted 82 lines · Andre Muezerie
When compiling "drivers" directory with MSVC the errors below popped up:
1)
LINK : warning LNK4044: unrecognized option '/Wl,/def:V:\github\dpdk\build\drivers\rte_bus_vdev_exports.def'; ignored2)
cl : Command line warning D9002 : ignoring unknown
option '-fno-asynchronous-unwind-tables'The fix is to remove the unnecessary/invalid option when using MSVC.
Signed-off-by Andre Muezerie <[email protected]>--- drivers/meson.build | 6 +++++- drivers/net/intel/i40e/meson.build | 2 +- drivers/net/intel/iavf/meson.build | 2 +- drivers/net/intel/ice/meson.build | 2 +- drivers/net/intel/ixgbe/meson.build | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-)drivers/meson.build +5
-1@@ -289,7 +289,11 @@ foreach subpath:subdirs output: '@0@_exports.def'.format(lib_name)) lk_deps += [def_file] - lk_args = ['-Wl,/def:' + def_file.full_path()] + if is_ms_compiler + lk_args = ['/def:' + def_file.full_path()] + else + lk_args = ['-Wl,/def:' + def_file.full_path()] + endif else mingw_map = custom_target(lib_name + '_mingw', command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],drivers/net/intel/i40e/meson.build +1
-1@@ -41,7 +41,7 @@ includes += include_directories('base') if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endifdrivers/net/intel/iavf/meson.build +1
-1@@ -29,7 +29,7 @@ includes += include_directories('base') if arch_subdir == 'x86' sources += files('iavf_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endifdrivers/net/intel/ice/meson.build +1
-1@@ -35,7 +35,7 @@ endif if arch_subdir == 'x86' sources += files('ice_rxtx_vec_sse.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endifdrivers/net/intel/ixgbe/meson.build +0
-0
drivers/net/intel/ixgbe/meson.build deps += ['hash', 'security'] · line 33
Quoted 8 lines
drivers/net/intel/ixgbe/meson.build +1
-1@@ -27,7 +27,7 @@ deps += ['hash', 'security'] if arch_subdir == 'x86' sources += files('ixgbe_rxtx_vec_sse.c') sources += files('ixgbe_recycle_mbufs_vec_common.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif elif arch_subdir == 'arm'
Out of interest I've just tried compiling up DPDK builds without these unwind-tables flag, and they all pass, including the mingw build. This is using:
$ x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 13-win32 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Therefore, I wonder if we can just remove all these flags completely for mingw now? They may only be needed for historical versions.
/Bruce
Quoted 18 lines · Bruce Richardson
drivers/net/intel/ixgbe/meson.build deps += ['hash', 'security'] · line 33
Quoted 13 lines
drivers/net/intel/ixgbe/meson.build +1
-1@@ -27,7 +27,7 @@ deps += ['hash', 'security'] if arch_subdir == 'x86' sources += files('ixgbe_rxtx_vec_sse.c') sources += files('ixgbe_recycle_mbufs_vec_common.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif elif arch_subdir == 'arm'Out of interest I've just tried compiling up DPDK builds without these unwind-tables flag, and they all pass, including the mingw build. This is using:
Quoted 8 lines
$ x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 13-win32 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Therefore, I wonder if we can just remove all these flags completely for mingw now? They may only be needed for historical versions.
Here is the original issue:
https://inbox.dpdk.org/dev/CAJFAV8z3qFhT9Vv5xOpLhi74BYAht2YCfL2ffLrmei4hfSG5jg@mail.gmail.com/
It happened with mingw 8.1.0 apparently.
Signature · 1 line
David Marchand
Quoted 26 lines · David Marchand
Quoted 24 lines · Bruce Richardson
drivers/net/intel/ixgbe/meson.build deps += ['hash', 'security'] · line 33
Quoted 13 lines
drivers/net/intel/ixgbe/meson.build +1
-1@@ -27,7 +27,7 @@ deps += ['hash', 'security'] if arch_subdir == 'x86' sources += files('ixgbe_rxtx_vec_sse.c') sources += files('ixgbe_recycle_mbufs_vec_common.c') - if is_windows and cc.get_id() != 'clang' + if is_windows and cc.get_id() == 'gcc' cflags += ['-fno-asynchronous-unwind-tables'] endif elif arch_subdir == 'arm'Out of interest I've just tried compiling up DPDK builds without these unwind-tables flag, and they all pass, including the mingw build. This is using:
$ x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 13-win32 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 8 lines
Quoted 2 lines
Therefore, I wonder if we can just remove all these flags completely for mingw now? They may only be needed for historical versions.
Here is the original issue:
https://inbox.dpdk.org/dev/CAJFAV8z3qFhT9Vv5xOpLhi74BYAht2YCfL2ffLrmei4hfSG5jg@mail.gmail.com/It happened with mingw 8.1.0 apparently.
Thanks.
Given how new and unpolished windows support is generally, I don't believe we should need to support many old versions of the mingw compiler. This is especially true given the native windows build support that is being worked on.
Looking at some CI logs[1], I believe mingw v10 is what is being used in the CI. I might try doing a patch to remove these flags and see what the CI makes of it. I'm not sure how many CI jobs in the various places (IOL lab, Intel, etc.) do mingw testing, to really know what our min version is.
/Bruce
[1] https://github.com/ovsrobot/dpdk/actions/runs/13802361658/job/38606948026