12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- From 5dacb904357c6474808aa0ee44615168d4f2da39 Mon Sep 17 00:00:00 2001
- From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- Date: Tue, 9 Nov 2021 09:56:36 +0800
- Subject: [PATCH 01/34] 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'
- Rebased to 14.0.0 by Jun Yuan Tan
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- ---
- lldb/source/Host/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
- index a018fd6c183d..936bdd461350 100644
- --- a/lldb/source/Host/CMakeLists.txt
- +++ b/lldb/source/Host/CMakeLists.txt
- @@ -137,7 +137,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
- list(APPEND EXTRA_LIBS kvm)
- endif()
- if (LLDB_ENABLE_LIBXML2)
- - list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES})
- + list(APPEND EXTRA_LIBS xml2)
- endif()
- if (HAVE_LIBDL)
- list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
- --
- 2.33.1
|