summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2022-01-26 19:45:26 -0800
committerIan Stokes <ian.stokes@intel.com>2022-02-02 14:36:55 +0000
commit33027afd229cdc3c7066105b20bbb791cb3341f6 (patch)
tree4425e5b0c55012ab84ef90f57628f00dcda28849 /acinclude.m4
parent0bca7fa1a3dd86bc75c7daf716b425289927feb7 (diff)
downloadopenvswitch-33027afd229cdc3c7066105b20bbb791cb3341f6.tar.gz
acinclude: Detect avx512 vpopcntdq compiler support.
Ubuntu Xenial 16.04 is using GCC 5.4 and it does not support target "-mavx512vpopcntdq" and cuases error lib/dpif-netdev-lookup-avx512-gather.c:356:47: error: attribute(target("avx512vpopcntdq")) is unknown GCC 7+ supports vpopcntdq: https://gcc.gnu.org/gcc-7/changes.html The patch detects vpopcntdq and disables AVX512 when not found. Fixes: 1e314891340d ("dpcls-avx512: Enable avx512 vector popcount instruction.") Reported-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: William Tu <u9012063@gmail.com> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Acked-by: Cian Ferriter <cian.ferriter@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 5c971e98c..0c360fd1e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -77,7 +77,7 @@ dnl Checks if compiler and binutils supports AVX512.
AC_DEFUN([OVS_CHECK_AVX512], [
OVS_CHECK_BINUTILS_AVX512
OVS_CHECK_CC_OPTION(
- [-mavx512f], [ovs_have_cc_mavx512f=yes], [ovs_have_cc_mavx512f=no])
+ [-mavx512f -mavx512vpopcntdq], [ovs_have_cc_mavx512f=yes], [ovs_have_cc_mavx512f=no])
AM_CONDITIONAL([HAVE_AVX512F], [test $ovs_have_cc_mavx512f = yes])
if test "$ovs_have_cc_mavx512f" = yes; then
AC_DEFINE([HAVE_AVX512F], [1],