summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch')
-rw-r--r--recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch b/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch
new file mode 100644
index 0000000..e96ef14
--- /dev/null
+++ b/recipes-devtools/clang/clang/0017-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch
@@ -0,0 +1,33 @@
1From 1f320fea9755b4616b12656ffa32191e8fe0aca3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 11 Dec 2019 10:23:15 -0800
4Subject: [PATCH] libclang: Use CMAKE_DL_LIBS for deducing libdl
5
6This helps in getting right settings for libdl irrespective of platform
7it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
8
9Fixes
10
11tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o: In function clang::CIndexer::getClangResourcesPath[abi:cxx11]()': 2019-12-06T06:04:39.2987601Z | CIndexer.cpp:(.text._ZN5clang8CIndexer21getClangResourcesPathB5cxx11Ev+0x8b): undefined reference to dladdr'
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 clang/tools/libclang/CMakeLists.txt | 5 ++---
16 1 file changed, 2 insertions(+), 3 deletions(-)
17
18diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
19index bd0c945a5e1..723fa95f14b 100644
20--- a/clang/tools/libclang/CMakeLists.txt
21+++ b/clang/tools/libclang/CMakeLists.txt
22@@ -60,9 +60,8 @@ if (TARGET clangTidyPlugin)
23 endif()
24 endif ()
25
26-find_library(DL_LIBRARY_PATH dl)
27-if (DL_LIBRARY_PATH)
28- list(APPEND LIBS dl)
29+if (HAVE_LIBDL)
30+ list(APPEND LIBS ${CMAKE_DL_LIBS})
31 endif()
32
33 option(LIBCLANG_BUILD_STATIC