diff options
Diffstat (limited to 'recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch b/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch new file mode 100644 index 0000000..4f23d69 --- /dev/null +++ b/recipes-devtools/clang/clang/0010-clang-Append-libunwind-to-compiler-rt-for-linking.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 3ba6f05d35c8b0c405bf62cdd93eecc5a5094165 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 25 Jan 2019 14:39:04 -0800 | ||
4 | Subject: [PATCH 10/18] clang: Append libunwind to compiler-rt for linking | ||
5 | |||
6 | Some packages which use libgcc tend to use low level unwind functions | ||
7 | too, and they are missing in compiler-rt but provided by llvm libunwind | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | clang/lib/Driver/ToolChains/CommonArgs.cpp | 6 ++++++ | ||
12 | 1 file changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
15 | index d7e316befa6..5f6b24e33eb 100644 | ||
16 | --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
17 | +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
18 | @@ -1191,6 +1191,12 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D, | ||
19 | switch (RLT) { | ||
20 | case ToolChain::RLT_CompilerRT: | ||
21 | CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins")); | ||
22 | + CmdArgs.push_back("--as-needed"); | ||
23 | + CmdArgs.push_back("-l:libunwind.a"); | ||
24 | + CmdArgs.push_back("-lpthread"); | ||
25 | + CmdArgs.push_back("-ldl"); | ||
26 | + CmdArgs.push_back("--no-as-needed"); | ||
27 | + | ||
28 | break; | ||
29 | case ToolChain::RLT_Libgcc: | ||
30 | // Make sure libgcc is not used under MSVC environment by default | ||
31 | -- | ||
32 | 2.20.1 | ||
33 | |||