From 708b3016e81a2a06883b0bb23bfedc8cb3e3239d Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Fri, 29 Sep 2023 01:36:23 +0200 Subject: libnfs: dont install libnfs-config.cmake kodi uses its own FindNFS.cmake to find libnfs and succeeds with pkgconfig. If libnfs-config.cmake is found it will also be utilized (for win/mac?) which is generally bad for cross-compiling and causes the prefix to get hardcoded to /usr thus libnfs.so.5.0.2 is taken from the host machine Removing this file fixes: | aarch64-poky-linux-ld.lld: error: /usr/lib/libnfs.so.5.0.2 is incompatible with elf64-littleaarch64 | aarch64-poky-linux-clang++: error: linker command failed with exit code 1 (use -v to see invocation) | ninja: build stopped: subcommand failed. Add CFLAG workaround to fix compiling with clang complaining about old coding style while gcc doesn't care. Signed-off-by: Markus Volk Signed-off-by: Khem Raj --- meta-oe/recipes-connectivity/libnfs/libnfs_5.0.2.bb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meta-oe/recipes-connectivity/libnfs/libnfs_5.0.2.bb b/meta-oe/recipes-connectivity/libnfs/libnfs_5.0.2.bb index e0df18a50c..a025189b82 100644 --- a/meta-oe/recipes-connectivity/libnfs/libnfs_5.0.2.bb +++ b/meta-oe/recipes-connectivity/libnfs/libnfs_5.0.2.bb @@ -3,10 +3,18 @@ HOMEPAGE = "https://github.com/sahlberg/libnfs" LICENSE = "LGPL-2.1-only & BSD-2-Clause & GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=825301ba17efc9d188ee0abd4b924ada" -SRC_URI = "git://github.com/sahlberg/libnfs.git;protocol=https;branch=master \ - file://0001-CMakeLists.txt-respect-CMAKE_INSTALL_LIBDIR-for-mult.patch \ +SRC_URI = " \ + git://github.com/sahlberg/libnfs.git;protocol=https;branch=master \ + file://0001-CMakeLists.txt-respect-CMAKE_INSTALL_LIBDIR-for-mult.patch \ " SRCREV = "40348f45d6beb8a8f50b6b63414a98fc1a061b7d" S = "${WORKDIR}/git" inherit cmake + +do_install:append() { + rm -f ${D}${libdir}/cmake/libnfs/libnfs-config.cmake +} + +# Workaround for clang +CFLAGS += "-Wno-implicit-function-declaration" -- cgit v1.2.3-54-g00ecf