diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 1932413..171a857 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -373,6 +373,7 @@ public:
   OpenBSDTargetInfo(const std::string &triple)
     : OSTargetInfo<Target>(triple) {
       this->UserLabelPrefix = "";
+      this->TLSSupported = false;
 
       llvm::Triple Triple(triple);
       switch (Triple.getArch()) {
diff --git a/test/Driver/tls.c b/test/Driver/tls.c
new file mode 100644
index 0000000..c49a8d1
--- /dev/null
+++ b/test/Driver/tls.c
@@ -0,0 +1,20 @@
+// Test that TLS is correctly considered supported or unsupported for the
+// different targets.
+
+// Linux supports TLS.
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu %s
+// RUN: %clang_cc1 -triple i386-pc-linux-gnu %s
+
+// Darwin supports TLS since 10.7. (FIXME: Is this correct?)
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 %s
+
+// FIXME: I thought it was supported actually?
+// RUN: %clang_cc1 -verify -triple x86_64-pc-win32 %s
+// RUN: %clang_cc1 -verify -triple i386-pc-win32 %s
+
+// OpenBSD does not suppport TLS.
+// RUN: %clang_cc1 -verify -triple x86_64-pc-openbsd %s
+// RUN: %clang_cc1 -verify -triple i386-pc-openbsd %s
+
+__thread int x; // expected-error {{thread-local storage is unsupported for the current target}}
