Disable enforcing alignas() for structs that are used as thread_local
data on NetBSD. The NetBSD ld.so implementation is buggy and does
not enforce correct alignment; however, clang seems to take it for
granted and generates instructions that segv on wrongly aligned objects.
Therefore, disable those alignas() statements on NetBSD until we can
establish a better fix.
Apparently, std::aligned_storage<> does not have any real effect
at the moment, so we can leave it as-is.
Can we introduce a macro like:
And later:
struct XRAY_TLS_ALIGNAS64 ThreadLocalData {and
#ifdef XRAY_TLS_ALIGNED_SUPPORTED static_assert(alignof(ThreadLocalData) >= 64, "ThreadLocalData must be cache line aligned."); #endif