Skip to content

Commit e5e12f2

Browse files
committed
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 <[email protected]>
1 parent 35dee46 commit e5e12f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/arch/simddetect.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
#include "simddetect.h"
2626
#include "tprintf.h" // for tprintf
2727

28+
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 12)
29+
// The GNU compiler g++ fails to compile with the Accelerate framework
30+
// (tested with versions 10 and 11), so unconditionally disable it.
31+
#undef HAVE_FRAMEWORK_ACCELERATE
32+
#endif
33+
2834
#if defined(HAVE_FRAMEWORK_ACCELERATE)
2935

3036
// Use Apple Accelerate framework.

0 commit comments

Comments
 (0)