[cfe-commits] r167576 - in /cfe/trunk: lib/Basic/Targets.cpp test/Sema/tls.c

Benjamin Kramer benny.kra at googlemail.com
Thu Nov 8 04:59:16 PST 2012


Author: d0k
Date: Thu Nov  8 06:59:15 2012
New Revision: 167576

URL: http://llvm.org/viewvc/llvm-project?rev=167576&view=rev
Log:
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!

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Sema/tls.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=167576&r1=167575&r2=167576&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Nov  8 06:59:15 2012
@@ -2745,6 +2745,7 @@
     IntPtrType = SignedLong;
     PtrDiffType = SignedLong;
     this->UserLabelPrefix = "";
+    this->TLSSupported = false;
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {

Modified: cfe/trunk/test/Sema/tls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/tls.c?rev=167576&r1=167575&r2=167576&view=diff
==============================================================================
--- cfe/trunk/test/Sema/tls.c (original)
+++ cfe/trunk/test/Sema/tls.c Thu Nov  8 06:59:15 2012
@@ -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;





More information about the cfe-commits mailing list