diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch new file mode 100644 index 0000000000..bc480d9699 --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch @@ -0,0 +1,34 @@ +From 0eee3fb85dad084b6b42f7b219d8aa3a62620a27 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Wed, 28 Oct 2020 09:52:40 +0800 +Subject: [PATCH] civetweb/CMakeLists.txt: do not search gcc-ar and gcc-ranlib + +Do not search gcc-ar and gcc-ranlib. Specify GCC_AR and GCC_RANLIB in +EXTRA_OECMAKE to avoid host contamination. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao +--- + thirdparty/civetweb-1.10/CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/thirdparty/civetweb-1.10/CMakeLists.txt b/thirdparty/civetweb-1.10/CMakeLists.txt +index f559a04e..0689e3f6 100644 +--- a/thirdparty/civetweb-1.10/CMakeLists.txt ++++ b/thirdparty/civetweb-1.10/CMakeLists.txt +@@ -246,11 +246,9 @@ set_property(CACHE CIVETWEB_CXX_STANDARD PROPERTY STRINGS auto c++14 c++11 c++98 + + # Configure the linker + if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") +- find_program(GCC_AR gcc-ar) + if (GCC_AR) + set(CMAKE_AR ${GCC_AR}) + endif() +- find_program(GCC_RANLIB gcc-ranlib) + if (GCC_RANLIB) + set(CMAKE_RANLIB ${GCC_RANLIB}) + endif() +-- +2.17.1 + diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb index 9113fa67ad..9b66c48e37 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb @@ -27,6 +27,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \ file://0001-CMakeLists.txt-use-curl-local-source-tarball.patch \ file://0002-cmake-LibreSSL.cmake-use-libressl-local-source-tarba.patch \ file://0003-cmake-BundledOSSPUUID.cmake-use-ossp-uuid-local-sour.patch \ + file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \ file://minifi.service \ file://systemd-volatile.conf \ file://sysvinit-volatile.conf \ @@ -52,6 +53,8 @@ OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" EXTRA_OECMAKE += " \ -DHOST_SYS=${HOST_SYS} -DBUILD_SYS=${BUILD_SYS} \ -DSKIP_TESTS=ON \ + -DGCC_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ + -DGCC_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ " EXTRA_OECMAKE_append_toolchain-clang = " -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib" LDFLAGS_append_toolchain-clang = " -fuse-ld=lld"