Closed knyipab closed 8 months ago
It seems that target_clones
attribute doesn't make clang LTO happy. You can disable it by patching src/common/darktable.h
.
--- a/src/common/darktable.h
+++ b/src/common/darktable.h
@@ -140,7 +140,7 @@
/* 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)
+#if __has_attribute(target_clones) && !defined(_WIN32) && !defined(NATIVE_ARCH) && !defined(__ANDROID__)
# 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__)
Thanks a lot! Let me pose a pull request later.
I am adding a new package darktable (https://www.darktable.org/). I managed to get aarch64 compilation successful but x86_64 does not (FYI 32-bit are not supported by official source), with strange linker errors
error: relocation refers to a symbol in a discarded section
. I am not very familiar with compilation and really grateful for help.The code is avilabale at the
darktable
branch: https://github.com/knyipab/tur/blob/darktable/tur/darktable/build.sh.The build log is available at https://github.com/knyipab/tur/actions/runs/7945273863/job/21691739193#step:7:7049, with excerpt below:
Thanks for any help!