From: Nathan Moos Date: Fri, 15 Jan 2021 23:50:59 +0000 (-0800) Subject: vppinfra: add option to use libexecinfo X-Git-Tag: v21.10-rc0~700 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F30789%2F4;p=vpp.git vppinfra: add option to use libexecinfo Type: feature The musl libc does not provide or an implementation of the functions provided. This patch enables the use of libexecinfo as an alternative, which can be used on systems with musl. Change-Id: I76b5744ddf731b66e16144025a6fdedf72925260 Signed-off-by: Nathan Moos --- diff --git a/src/vppinfra/CMakeLists.txt b/src/vppinfra/CMakeLists.txt index 07fc1095c6b..8ec843ad2ca 100644 --- a/src/vppinfra/CMakeLists.txt +++ b/src/vppinfra/CMakeLists.txt @@ -200,9 +200,13 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") ) endif() +option(VPP_USE_EXTERNAL_LIBEXECINFO "Use external libexecinfo (useful for non-glibc targets)." OFF) +if(VPP_USE_EXTERNAL_LIBEXECINFO) + set(EXECINFO_LIB execinfo) +endif() add_vpp_library(vppinfra SOURCES ${VPPINFRA_SRCS} - LINK_LIBRARIES m + LINK_LIBRARIES m ${EXECINFO_LIB} INSTALL_HEADERS ${VPPINFRA_HEADERS} COMPONENT libvppinfra LTO