Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sergey-dryabzhinsky/f03e1ebb3041c115fd22f2d4962ba42f to your computer and use it in GitHub Desktop.

Select an option

Save sergey-dryabzhinsky/f03e1ebb3041c115fd22f2d4962ba42f to your computer and use it in GitHub Desktop.
Disable use of avx512 instructions that may confuse older binutils << 2.28
--- redis84-8.4.0.orig/src/bitops.c
+++ redis84-8.4.0/src/bitops.c
@@ -36,11 +36,17 @@
#endif
/* AArch64 NEON support is determined at compile time via HAVE_AARCH64_NEON */
+#ifdef USE_AVX512
+#pragma message("Use of AVX512 enabled.")
#ifdef HAVE_AVX512
#define BITOP_USE_AVX512 (__builtin_cpu_supports("avx512f") && __builtin_cpu_supports("avx512vpopcntdq"))
#else
#define BITOP_USE_AVX512 0
#endif
+#else
+#pragma message("Use of AVX512 disabled.")
+#define BITOP_USE_AVX512 0
+#endif
/* -----------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment