blob: d813b37f99e7ffb96a93ca2300a4da7ebf708f80 [file] [log] [blame]
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -05001From 609e1745d26d6f42d426018a4dd8d2342d6fc170 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 18 Aug 2020 08:37:57 -0700
4Subject: [PATCH] Add -lxml2 to linker cmdline of xml is found
5
6When cross compiling for systems where static libs
7for libxml are not available cmake's detection mechanism
8resort to linking with libxml.so but doesnt use -lxml2
9liblldbHost.a however requires libxml on linker
10cmdline _after_ itself so its use of symbols from libxml2
11can be resolved. Here check for libxml2 being detected and
12add it if its found.
13
14Fixes
15minifi-cpp/0.7.0-r0/recipe-sysroot-native/usr/lib/libxml2.so is incompatible with elf32-i386
16| clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
17
18Upstream-Status: Pending
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 thirdparty/libarchive-3.3.2/CMakeLists.txt | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/thirdparty/libarchive-3.3.2/CMakeLists.txt b/thirdparty/libarchive-3.3.2/CMakeLists.txt
25index 0c1ea6f7..cde0cc51 100644
26--- a/thirdparty/libarchive-3.3.2/CMakeLists.txt
27+++ b/thirdparty/libarchive-3.3.2/CMakeLists.txt
28@@ -1031,7 +1031,7 @@ ENDIF()
29 IF(LIBXML2_FOUND)
30 CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
31 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
32- LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES})
33+ LIST(APPEND ADDITIONAL_LIBS xml2)
34 SET(HAVE_LIBXML2 1)
35 # libxml2's include files use iconv.h
36 SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
37--
382.28.0
39