Disable AVX512 when using ancient versions of GCC
This commit is contained in:
parent
a8abbec660
commit
e60bb52a33
@ -330,10 +330,12 @@ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"])
|
|||||||
AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"])
|
AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"])
|
||||||
AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"])
|
AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for a broken clang + AVX512 combination)
|
AC_MSG_CHECKING(for obsolete compiler with possibly broken AVX512 support)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||||
#if !(defined(__AVX512F__) && defined(__clang__) && __clang_major__ < 4)
|
#if !(defined(__AVX512F__) && \
|
||||||
#error Not a broken clang + AVX512 combination
|
((defined(__clang__) && __clang_major__ < 4) || \
|
||||||
|
(defined(__GNUC__) && __GNUC__ < 6)))
|
||||||
|
#error Compiler should properly support AVX512 opcodes
|
||||||
#endif
|
#endif
|
||||||
]])],
|
]])],
|
||||||
[AC_MSG_RESULT(yes - disabling AVX512 optimizations)
|
[AC_MSG_RESULT(yes - disabling AVX512 optimizations)
|
||||||
|
Loading…
Reference in New Issue
Block a user