From e5ca9a3789bc8e2e34af91d6eb5e3effa3f8d0d7 Mon Sep 17 00:00:00 2001 From: Ivan <5627721+abyss7@users.noreply.github.com> Date: Sat, 2 May 2020 15:07:57 +0300 Subject: [PATCH] Fix FreeBSD build (#10150) * Add ranlib into toolchain * Disable LLVM --- cmake/freebsd/toolchain-x86_64.cmake | 3 +++ cmake/target.cmake | 1 + 2 files changed, 4 insertions(+) diff --git a/cmake/freebsd/toolchain-x86_64.cmake b/cmake/freebsd/toolchain-x86_64.cmake index 30468731b69..0961250ef8e 100644 --- a/cmake/freebsd/toolchain-x86_64.cmake +++ b/cmake/freebsd/toolchain-x86_64.cmake @@ -7,6 +7,9 @@ set (CMAKE_SYSROOT "${CMAKE_CURRENT_LIST_DIR}/../toolchain/freebsd-x86_64") set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it doesn't work in CMake +set (CMAKE_AR "/usr/bin/ar" CACHE FILEPATH "" FORCE) +set (CMAKE_RANLIB "/usr/bin/ranlib" CACHE FILEPATH "" FORCE) + set (LINKER_NAME "lld" CACHE STRING "" FORCE) set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld") diff --git a/cmake/target.cmake b/cmake/target.cmake index 03d470b0aea..1325758811f 100644 --- a/cmake/target.cmake +++ b/cmake/target.cmake @@ -27,6 +27,7 @@ if (CMAKE_CROSSCOMPILING) elseif (OS_FREEBSD) # FIXME: broken dependencies set (ENABLE_PROTOBUF OFF CACHE INTERNAL "") + set (ENABLE_EMBEDDED_COMPILER OFF CACHE INTERNAL "") else () message (FATAL_ERROR "Trying to cross-compile to unsupported system: ${CMAKE_SYSTEM_NAME}!") endif ()