Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 1 | From 609e1745d26d6f42d426018a4dd8d2342d6fc170 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 18 Aug 2020 08:37:57 -0700 |
| 4 | Subject: [PATCH] Add -lxml2 to linker cmdline of xml is found |
| 5 | |
| 6 | When cross compiling for systems where static libs |
| 7 | for libxml are not available cmake's detection mechanism |
| 8 | resort to linking with libxml.so but doesnt use -lxml2 |
| 9 | liblldbHost.a however requires libxml on linker |
| 10 | cmdline _after_ itself so its use of symbols from libxml2 |
| 11 | can be resolved. Here check for libxml2 being detected and |
| 12 | add it if its found. |
| 13 | |
| 14 | Fixes |
| 15 | minifi-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 | |
| 18 | Upstream-Status: Pending |
| 19 | Signed-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 | |
| 24 | diff --git a/thirdparty/libarchive-3.3.2/CMakeLists.txt b/thirdparty/libarchive-3.3.2/CMakeLists.txt |
| 25 | index 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 | -- |
| 38 | 2.28.0 |
| 39 | |