Skip to content

Instantly share code, notes, and snippets.

@sergey-dryabzhinsky
Last active November 30, 2025 11:39
Show Gist options
  • Select an option

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

Select an option

Save sergey-dryabzhinsky/19ef6e3c7fc51857c5016e4736401aba to your computer and use it in GitHub Desktop.
Completely disable use of avx512 to not confuse older binutils << 2.28
--- redis84-8.4.0.orig/src/config.h
+++ redis84-8.4.0/src/config.h
@@ -357,7 +357,7 @@ void setcpuaffinity(const char *cpulist)
/* Check if we can compile AVX512 code */
#if defined (__x86_64__) && ((defined(__GNUC__) && __GNUC__ >= 5) || (defined(__clang__) && __clang_major__ >= 4))
#if defined(__has_attribute) && __has_attribute(target)
-#define HAVE_AVX512
+#define HAVE_AVX512_
#define ATTRIBUTE_TARGET_AVX512_POPCOUNT __attribute__((target("avx512f,avx512vpopcntdq")))
#endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment