Skip to content

Commit

Permalink
net/intel: fix build warnings when using icx
Browse files Browse the repository at this point in the history
The Intel oneAPI DPC++/C++ Compiler (icx), issues warnings on build when
the "-march=native", or other configured global "-march" flag, is
overridden to "skylake-avx512", when compiling AVX-512 code.

Allow building with icx with warnings-as-errors flag (werror) enabled by
disabling the warning for the cases where we pass that extra "-march"
flag.

Fixes: e6a6a13 ("net/i40e: add AVX512 vector path")
Fixes: 31737f2 ("net/iavf: enable AVX512 for legacy Rx")
Fixes: 7f85d5e ("net/ice: add AVX512 vector path")
Fixes: 0fac6a1 ("common/idpf: add AVX512 for single queue model")
Cc: [email protected]

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Ian Stokes <[email protected]>
  • Loading branch information
bruce-richardson committed Feb 11, 2025
1 parent 47be8c2 commit 7c50199
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/intel/i40e/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ if arch_subdir == 'x86'
avx512_args = cflags + cc_avx512_flags
if cc.has_argument('-march=skylake-avx512')
avx512_args += '-march=skylake-avx512'
if cc.has_argument('-Wno-overriding-option')
avx512_args += '-Wno-overriding-option'
endif
endif
i40e_avx512_lib = static_library('i40e_avx512_lib',
'i40e_rxtx_vec_avx512.c',
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/intel/iavf/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ if arch_subdir == 'x86'
avx512_args = cflags + cc_avx512_flags
if cc.has_argument('-march=skylake-avx512')
avx512_args += '-march=skylake-avx512'
if cc.has_argument('-Wno-overriding-option')
avx512_args += '-Wno-overriding-option'
endif
endif
iavf_avx512_lib = static_library('iavf_avx512_lib',
'iavf_rxtx_vec_avx512.c',
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/intel/ice/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ if arch_subdir == 'x86'
avx512_args = cflags + cc_avx512_flags
if cc.has_argument('-march=skylake-avx512')
avx512_args += '-march=skylake-avx512'
if cc.has_argument('-Wno-overriding-option')
avx512_args += '-Wno-overriding-option'
endif
endif
ice_avx512_lib = static_library('ice_avx512_lib',
'ice_rxtx_vec_avx512.c',
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/intel/idpf/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ if arch_subdir == 'x86'
avx512_args = cflags + cc_avx512_flags
if cc.has_argument('-march=skylake-avx512')
avx512_args += '-march=skylake-avx512'
if cc.has_argument('-Wno-overriding-option')
avx512_args += '-Wno-overriding-option'
endif
endif
idpf_common_avx512_lib = static_library('idpf_common_avx512_lib',
'idpf_common_rxtx_avx512.c',
Expand Down

0 comments on commit 7c50199

Please sign in to comment.