diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-14 17:17:32 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-08 11:37:54 -0700 |
commit | 76e37fafa29e9b2097eb823537b17d6cc638c1d5 (patch) | |
tree | 3456996103d56b15645179eebb0b52d2bce58445 /recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch | |
parent | 94cceaf952b72b6b02a117ef35fed3928e7dd7b3 (diff) | |
download | meta-clang-76e37fafa29e9b2097eb823537b17d6cc638c1d5.tar.gz |
clang: Upgrade to trunk/13.0 future series
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch deleted file mode 100644 index a785bda..0000000 --- a/recipes-devtools/clang/clang/0016-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From c309e121d6aca050119084e3e98371cd8e44ecca Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 31 Jul 2019 22:51:39 -0700 | ||
4 | Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static | ||
5 | linking | ||
6 | |||
7 | When doing static liking with --unwindlib=libunwind -static we encounter | ||
8 | undefined symbols | ||
9 | libunwind/src/RWMutex.hpp:68: undefined reference to `pthread_rwlock_wrlock' | ||
10 | |||
11 | and | ||
12 | |||
13 | libunwind/src/AddressSpace.hpp:597: undefined reference to `dladdr' | ||
14 | |||
15 | therefore we need to link in libpthread and libdl to fill these symbols | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | clang/lib/Driver/ToolChains/CommonArgs.cpp | 7 ++++++- | ||
20 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
23 | index bcaea71dca94..95b806e29ef2 100644 | ||
24 | --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
25 | +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
26 | @@ -1423,8 +1423,13 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D, | ||
27 | // Let the linker choose between libunwind.dll.a and libunwind.a | ||
28 | // depending on what's available, and depending on the -static flag | ||
29 | CmdArgs.push_back("-lunwind"); | ||
30 | - } else | ||
31 | + } else { | ||
32 | CmdArgs.push_back("-l:libunwind.so"); | ||
33 | + if (Args.hasArg(options::OPT_static)) { | ||
34 | + CmdArgs.push_back("-lpthread"); | ||
35 | + CmdArgs.push_back("-ldl"); | ||
36 | + } | ||
37 | + } | ||
38 | break; | ||
39 | } | ||
40 | |||