From: Benjamin Kramer Date: Thu, 8 Nov 2012 12:59:15 +0000 (+0000) Subject: Set TLSSupported to false on Haiku. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef7bceadf4b43c953855013577afac4c2fcb1d62;p=clang Set TLSSupported to false on Haiku. Haiku does not support this (yet). Leaving it set to true leads to configure scripts detecting __thread being available and Clang emitting code for it, resulting in binaries the runtime_loader will refuse to load. Patch by Jonathan Schleifer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167576 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index e52013ef0f..ed3bd0be49 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2745,6 +2745,7 @@ public: IntPtrType = SignedLong; PtrDiffType = SignedLong; this->UserLabelPrefix = ""; + this->TLSSupported = false; } virtual void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { diff --git a/test/Sema/tls.c b/test/Sema/tls.c index 3b2a441bfe..4e5cfef0a3 100644 --- a/test/Sema/tls.c +++ b/test/Sema/tls.c @@ -17,4 +17,7 @@ // RUN: not %clang_cc1 -triple x86_64-pc-openbsd -fsyntax-only %s // RUN: not %clang_cc1 -triple i386-pc-openbsd -fsyntax-only %s +// Haiku does not suppport TLS. +// RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s + __thread int x;