[clang] b42d57a - [clang][Driver][OpenBSD] libcxx also requires pthread
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 20 17:53:45 PST 2021
Author: Brad Smith
Date: 2021-02-20T20:53:25-05:00
New Revision: b42d57a100c5df6ace68f686f5adaabeafe8a0f6
URL: https://github.com/llvm/llvm-project/commit/b42d57a100c5df6ace68f686f5adaabeafe8a0f6
DIFF: https://github.com/llvm/llvm-project/commit/b42d57a100c5df6ace68f686f5adaabeafe8a0f6.diff
LOG: [clang][Driver][OpenBSD] libcxx also requires pthread
Added:
Modified:
clang/lib/Driver/ToolChains/OpenBSD.cpp
clang/test/Driver/openbsd.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/OpenBSD.cpp b/clang/lib/Driver/ToolChains/OpenBSD.cpp
index f155d74632f9..e162165b2561 100644
--- a/clang/lib/Driver/ToolChains/OpenBSD.cpp
+++ b/clang/lib/Driver/ToolChains/OpenBSD.cpp
@@ -296,6 +296,7 @@ void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args,
CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++");
CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi");
+ CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread");
}
std::string OpenBSD::getCompilerRT(const ArgList &Args,
diff --git a/clang/test/Driver/openbsd.cpp b/clang/test/Driver/openbsd.cpp
index 9293148680c8..23c365d28e7e 100644
--- a/clang/test/Driver/openbsd.cpp
+++ b/clang/test/Driver/openbsd.cpp
@@ -6,7 +6,7 @@
// RUN: | FileCheck --check-prefix=CHECK-CXX %s
// RUN: %clangxx %s -### -o %t.o -target arm-unknown-openbsd 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CXX %s
-// CHECK-CXX: "-lc++" "-lc++abi" "-lm"
+// CHECK-CXX: "-lc++" "-lc++abi" "-lpthread" "-lm"
// RUN: %clangxx %s -### -pg -o %t.o -target amd64-pc-openbsd 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
@@ -16,4 +16,4 @@
// RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
// RUN: %clangxx %s -### -pg -o %t.o -target arm-unknown-openbsd 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
-// CHECK-PG-CXX: "-lc++_p" "-lc++abi_p" "-lm_p"
+// CHECK-PG-CXX: "-lc++_p" "-lc++abi_p" "-lpthread_p" "-lm_p"
More information about the cfe-commits
mailing list