summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2017-05-09 21:09:27 +0000
committerkettenis <kettenis@openbsd.org>2017-05-09 21:09:27 +0000
commit247444e3e456e299c607fd19dda8d130f3637bcf (patch)
tree7a9000e28629d493a3c1bf574d56772b3da16d01
parentIf the target pane for send-keys in in a mode with a key table (that is, (diff)
downloadwireguard-openbsd-247444e3e456e299c607fd19dda8d130f3637bcf.tar.xz
wireguard-openbsd-247444e3e456e299c607fd19dda8d130f3637bcf.zip
Enable TLS support but default to the emulatated TLS model. Enable the
runtime support code libcompiler_rt for this. This code uses functions that live in libpthread, so code that uses TLS support will need to be linked with -lpthread. This should allow more ports to build with base clang. ok espie@
-rw-r--r--gnu/llvm/tools/clang/lib/Basic/Targets.cpp2
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/Tools.cpp3
-rw-r--r--lib/libcompiler_rt/Makefile3
3 files changed, 4 insertions, 4 deletions
diff --git a/gnu/llvm/tools/clang/lib/Basic/Targets.cpp b/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
index 455b03f6eac..50e6a751e88 100644
--- a/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
+++ b/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
@@ -549,8 +549,6 @@ protected:
public:
OpenBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
: OSTargetInfo<Target>(Triple, Opts) {
- this->TLSSupported = false;
-
switch (Triple.getArch()) {
default:
case llvm::Triple::x86:
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
index e212feb9d08..bd736c822c9 100644
--- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -5370,7 +5370,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names);
// Emulated TLS is enabled by default on Android, and can be enabled manually
// with -femulated-tls.
- bool EmulatedTLSDefault = Triple.isAndroid() || Triple.isWindowsCygwinEnvironment();
+ bool EmulatedTLSDefault = Triple.isAndroid() || Triple.isOSOpenBSD() ||
+ Triple.isWindowsCygwinEnvironment();
if (Args.hasFlag(options::OPT_femulated_tls, options::OPT_fno_emulated_tls,
EmulatedTLSDefault))
CmdArgs.push_back("-femulated-tls");
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index a2a249c83b9..a52d6254ae8 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2017/04/17 15:53:21 kettenis Exp $
+# $OpenBSD: Makefile,v 1.8 2017/05/09 21:09:27 kettenis Exp $
.include <bsd.own.mk>
@@ -64,6 +64,7 @@ GEN_SRCS= absvdi2 \
divti3 \
divtf3 \
divxc3 \
+ emutls \
enable_execute_stack \
eprintf \
extendsfdf2 \