net/i40e: fix build for Windows MinGW
authorLeyi Rong <leyi.rong@intel.com>
Tue, 2 Feb 2021 14:32:58 +0000 (22:32 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 Feb 2021 17:19:36 +0000 (18:19 +0100)
Adds extra cflags '-fno-asynchronous-unwind-tables'
to avoid the MinGW build error:
Error: invalid register for .seh_savexmm

Fixes: 5c38c33f7880 ("net/i40e: disable AVX512 with MinGW")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
drivers/net/i40e/meson.build

index f5fc5a1..ce3cc65 100644 (file)
@@ -28,6 +28,10 @@ includes += include_directories('base')
 if arch_subdir == 'x86'
        sources += files('i40e_rxtx_vec_sse.c')
 
+       if is_windows and cc.get_id() != 'clang'
+               cflags += ['-fno-asynchronous-unwind-tables']
+       endif
+
        # compile AVX2 version if either:
        # a. we have AVX supported in minimum instruction set baseline
        # b. it's not minimum instruction set, but supported by compiler
@@ -54,10 +58,6 @@ if arch_subdir == 'x86'
                cc.has_argument('-mavx512f') and
                cc.has_argument('-mavx512bw'))
 
-       if is_windows and cc.get_id() != 'clang'
-               i40e_avx512_cc_support = false
-       endif
-
        if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
                cflags += ['-DCC_AVX512_SUPPORT']
                avx512_args = [cflags, '-mavx512f', '-mavx512bw']