From 609e1745d26d6f42d426018a4dd8d2342d6fc170 Mon Sep 17 00:00:00 2001
|
From: Khem Raj <raj.khem@gmail.com>
|
Date: Tue, 18 Aug 2020 08:37:57 -0700
|
Subject: [PATCH] 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
|
minifi-cpp/0.7.0-r0/recipe-sysroot-native/usr/lib/libxml2.so is incompatible with elf32-i386
|
| clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
|
|
Upstream-Status: Pending
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
---
|
thirdparty/libarchive-3.3.2/CMakeLists.txt | 2 +-
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
diff --git a/thirdparty/libarchive-3.3.2/CMakeLists.txt b/thirdparty/libarchive-3.3.2/CMakeLists.txt
|
index 0c1ea6f7..cde0cc51 100644
|
--- a/thirdparty/libarchive-3.3.2/CMakeLists.txt
|
+++ b/thirdparty/libarchive-3.3.2/CMakeLists.txt
|
@@ -1031,7 +1031,7 @@ ENDIF()
|
IF(LIBXML2_FOUND)
|
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
- LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES})
|
+ LIST(APPEND ADDITIONAL_LIBS xml2)
|
SET(HAVE_LIBXML2 1)
|
# libxml2's include files use iconv.h
|
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
|
--
|
2.28.0
|