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
@@ -74,6 +74,7 @@ typedef unsigned int u_int;
 #include <sys/types.h>
 #endif
 #if defined(__NetBSD__) || defined(__OpenBSD__)
+typedef unsigned long u_long;
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #endif
@@ -145,7 +146,12 @@ G_BEGIN_DECLS
 /* 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(NATIVE_ARCH) && !defined(__APPLE__) && defined(__GLIBC__)
+#if __has_attribute(target_clones) \
+    && (((defined(__linux__) || defined(__GNU__)) && defined(__GLIBC__)) \
+        || (!defined(NATIVE_ARCH) \
+            && !defined(_WIN32) \
+            && !defined(__APPLE__) \
+            && !defined(__OpenBSD__)))
 # if 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 defined(__PPC64__)
