diff options
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.patch | 33 |
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 @@ | |||
1 | From 1f320fea9755b4616b12656ffa32191e8fe0aca3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 11 Dec 2019 10:23:15 -0800 | ||
4 | Subject: [PATCH] libclang: Use CMAKE_DL_LIBS for deducing libdl | ||
5 | |||
6 | This helps in getting right settings for libdl irrespective of platform | ||
7 | it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON | ||
8 | |||
9 | Fixes | ||
10 | |||
11 | tools/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 | |||
13 | Signed-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 | |||
18 | diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt | ||
19 | index 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 | ||