summaryrefslogtreecommitdiffstats
path: root/external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
commit4204309872da5cb401cbb2729d9e2d4869a87f42 (patch)
treec7415e8600205e40ff7e91e8e5f4c411f30329f2 /external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
parent5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff)
Diffstat (limited to 'external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch')
-rw-r--r--external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
new file mode 100644
index 00000000..c331e7a7
--- /dev/null
+++ b/external/meta-clang/recipes-devtools/clang/clang/0002-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
@@ -0,0 +1,40 @@
+From fa140ec90e72da40d49301e674c84854fdac804b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2017 17:36:16 -0700
+Subject: [PATCH 2/2] lldb: Add -lxml2 to linker cmdline of xml is found
+
+When cross compiling for systems where static libs
+for libxml are not available cmake's detection mechanism
+resort to linking with libxml.so but doesnt use -lxml2
+liblldbHost.a however requires libxml on linker
+cmdline _after_ itself so its use of symbols from libxml2
+can be resolved. Here check for libxml2 being detected and
+add it if its found.
+
+Fixes
+
+| ../../../../lib/liblldbHost.a(XML.cpp.o): In function `lldb_private::XMLDocument::Clear()':
+| /usr/src/debug/lldb/5.0.0+gitAUTOINC+69edad7913_08d6b47db9_cf6c5b3386-r0/git/tools/lldb/source/Host/common/XML.cpp:29: undefined reference to `xmlFreeDoc'
+| /usr/src/debug/lldb/5.0.0+gitAUTOINC+69edad7913_08d6b47db9_cf6c5b3386-r0/git/tools/lldb/source/Host/common/XML.cpp:29: undefined reference to `xmlFreeDoc'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ source/Host/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/Host/CMakeLists.txt b/source/Host/CMakeLists.txt
+index 5a92447ed..22ce6eee4 100644
+--- a/source/Host/CMakeLists.txt
++++ b/source/Host/CMakeLists.txt
+@@ -149,7 +149,7 @@ if (APPLE)
+ list(APPEND EXTRA_LIBS xml2)
+ else ()
+ if (LIBXML2_FOUND)
+- list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES})
++ list(APPEND EXTRA_LIBS xml2)
+ endif()
+ endif ()
+ if (HAVE_LIBDL)
+--
+2.20.1
+