From e5e12f28561ecff5aead13b2bffe6d226a94ad7b Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 6 Sep 2021 17:06:54 +0200 Subject: [PATCH] Disable HAVE_FRAMEWORK_ACCELERATE for compilers which fail to compile with it g++-10 and g++-11 throw compiler errors in builds with the Accelerate framework, so disable it for all GNU compilers before version 12 (which still has to be tested). Signed-off-by: Stefan Weil --- src/arch/simddetect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/arch/simddetect.cpp b/src/arch/simddetect.cpp index 4bc0ba036a..bb0efcf5d4 100644 --- a/src/arch/simddetect.cpp +++ b/src/arch/simddetect.cpp @@ -25,6 +25,12 @@ #include "simddetect.h" #include "tprintf.h" // for tprintf +#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 12) +// The GNU compiler g++ fails to compile with the Accelerate framework +// (tested with versions 10 and 11), so unconditionally disable it. +#undef HAVE_FRAMEWORK_ACCELERATE +#endif + #if defined(HAVE_FRAMEWORK_ACCELERATE) // Use Apple Accelerate framework.