void-packages/srcpkgs/darktable/patches/0001-define-target_clones-a...

26 lines
1.2 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 32c00c02073379ae0a85ecea53e57cd9c64ffe29 Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Thu, 25 Jul 2024 00:08:24 +0200
Subject: [PATCH] define target_clones attribute only for glibc
---
src/common/darktable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/darktable.h b/src/common/darktable.h
index c21248b0dc..5d9a272767 100644
--- a/src/common/darktable.h
+++ b/src/common/darktable.h
@@ -150,7 +150,7 @@ extern "C" {
/* 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__)
+#if __has_attribute(target_clones) && !defined(_WIN32) && !defined(NATIVE_ARCH) && !defined(__APPLE__) && defined(__GLIBC__)
# 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__)
--
2.45.2