9f0d5c8b8e
optimized for different CPUs. apparently clang 15 adds supports for this, but we don't have ifunc support in the toolchain, so it fails to link.
30 lines
1.9 KiB
Plaintext
30 lines
1.9 KiB
Plaintext
disable code which uses attribute(target_clones) to provide functions
|
||
optimized for different CPUs. apparently clang 15 adds supports for this,
|
||
but we don't have ifunc support in the toolchain, so it fails to link.
|
||
|
||
Index: src/common/darktable.h
|
||
--- src/common/darktable.h.orig
|
||
+++ src/common/darktable.h
|
||
@@ -126,14 +126,14 @@ typedef unsigned int u_int;
|
||
/* Create cloned functions for various CPU SSE generations */
|
||
/* See for instructions https://hannes.hauswedell.net/post/2017/12/09/fmv/ */
|
||
/* TL;DR : use only on SIMD functions containing low-level paralellized/vectorized loops */
|
||
-#if __has_attribute(target_clones) && !defined(_WIN32) && (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64))
|
||
-#define __DT_CLONE_TARGETS__ __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4")))
|
||
-#elif __has_attribute(target_clones) && !defined(_WIN32) && defined(__PPC64__)
|
||
-/* __PPC64__ is the only macro tested for in is_supported_platform.h, other macros would fail there anyway. */
|
||
-#define __DT_CLONE_TARGETS__ __attribute__((target_clones("default","cpu=power9")))
|
||
-#else
|
||
+// #if __has_attribute(target_clones) && !defined(_WIN32) && (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64))
|
||
+// #define __DT_CLONE_TARGETS__ __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4")))
|
||
+// #elif __has_attribute(target_clones) && !defined(_WIN32) && defined(__PPC64__)
|
||
+// /* __PPC64__ is the only macro tested for in is_supported_platform.h, other macros would fail there anyway. */
|
||
+// #define __DT_CLONE_TARGETS__ __attribute__((target_clones("default","cpu=power9")))
|
||
+// #else
|
||
#define __DT_CLONE_TARGETS__
|
||
-#endif
|
||
+// #endif
|
||
|
||
/* Helper to force heap vectors to be aligned on 64 bits blocks to enable AVX2 */
|
||
#define DT_ALIGNED_ARRAY __attribute__((aligned(64)))
|