void-packages/srcpkgs/darktable/patches/0001-only-use-target_clones...

26 lines
1.1 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 17a2b728e834ae046d6ba4a9e37868f2476be3ab Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Sat, 18 Apr 2020 09:24:45 +0200
Subject: [PATCH] only use target_clones with glibc
---
src/common/darktable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/common/darktable.h src/common/darktable.h
index b3ad929..ae871a0 100644
--- src/common/darktable.h
+++ src/common/darktable.h
@@ -102,7 +102,7 @@ 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(__SSE__)
+#if __has_attribute(target_clones) && !defined(_WIN32) && defined(__SSE__) && defined(__GLIBC__)
#define __DT_CLONE_TARGETS__ __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4")))
#else
#define __DT_CLONE_TARGETS__
--
2.26.1