I am compiling on OSX 10.11 with clang-3.7 from macports. Here's some sample code to demonstrate the problem: #include <stdio.h> #include <stdlib.h> int main() { #if(__has_builtin(__builtin_cpu_supports)) && defined(__x86_64__) printf("__builtin_cpu_supports: %d\n", __builtin_cpu_supports("sse3")); #else printf("__builtin_cpu_cupports not available\n"); #endif return EXIT_SUCCESS; } If I compile with clang-3.7 or clang-3.8 (both which claim to have the builtin cpu supports), everything works. However, during linking, I get the following: Undefined symbols for architecture x86_64: "___cpu_model", referenced from: _dt_init in darktable.c.o ld: symbol(s) not found for architecture x86_64 With earlier versions of clang, I see the else clause. I have also seen this in the wild where this problem exists for FreeBSD as well. https://github.com/darktable-org/darktable/commit/081bc5823870918160fdd93d0157d56263add7d5.
Yes, the required runtime support isn't currently in compiler-rt, it only exists in libgcc right now for the appropriate platforms. It shouldn't take much to do it though.
Moving to more specific "MachO" LLD component (instead of generic "All Bugs").
Moving to the compiler-rt component as that's where the support needs to reside.
This should be resolved by r275484.