All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Andre Muezerie <andremue@linux.microsoft.com>
Cc: Ian Stokes <ian.stokes@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH] drivers: remove invalid options for MSVC
Date: Wed, 12 Mar 2025 15:18:34 +0000	[thread overview]
Message-ID: <Z9Glyi4qOjAFBHTG@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <1741745636-20165-1-git-send-email-andremue@linux.microsoft.com>

On Tue, Mar 11, 2025 at 07:13:56PM -0700, Andre Muezerie wrote:
> 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.
> 
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> ---
>  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(-)
> 
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 05391a575d..fc7f7eed8c 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -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@'],
> diff --git a/drivers/net/intel/i40e/meson.build b/drivers/net/intel/i40e/meson.build
> index 2973ed1a01..fce5d997ed 100644
> --- a/drivers/net/intel/i40e/meson.build
> +++ b/drivers/net/intel/i40e/meson.build
> @@ -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
>  
> diff --git a/drivers/net/intel/iavf/meson.build b/drivers/net/intel/iavf/meson.build
> index f7eac7c57a..d801527ada 100644
> --- a/drivers/net/intel/iavf/meson.build
> +++ b/drivers/net/intel/iavf/meson.build
> @@ -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
>  
> diff --git a/drivers/net/intel/ice/meson.build b/drivers/net/intel/ice/meson.build
> index cbdf38c1c4..a28d62173c 100644
> --- a/drivers/net/intel/ice/meson.build
> +++ b/drivers/net/intel/ice/meson.build
> @@ -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
>  
> diff --git a/drivers/net/intel/ixgbe/meson.build b/drivers/net/intel/ixgbe/meson.build
> index 0ae12dd5ff..3553b0ffe1 100644
> --- a/drivers/net/intel/ixgbe/meson.build
> +++ b/drivers/net/intel/ixgbe/meson.build
> @@ -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

  parent reply	other threads:[~2025-03-12 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  2:13 [PATCH] drivers: remove invalid options for MSVC Andre Muezerie
2025-03-12  7:51 ` David Marchand
2025-03-12 14:22   ` Andre Muezerie
2025-03-12 15:18 ` Bruce Richardson [this message]
2025-03-12 15:29   ` David Marchand
2025-03-12 15:49     ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9Glyi4qOjAFBHTG@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=andremue@linux.microsoft.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.