From 301b7c3c8120e6bd05872777b6c292ebc8230a27 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 26 Feb 2022 11:33:44 +0100 Subject: [PATCH] package/libtorrent: fix build with libexecinfo Fix the following build failure on rtorrent raised on uclibc and musl since the addition of libexecinfo package in commit eea8ba446c10701a273432552108d80fb2224ef4: /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/lib/libtorrent.so: undefined reference to `backtrace_symbols' Fixes: - http://autobuild.buildroot.org/results/6cb4ba56fc0a3a8bd02b246ab9bc82edaa552ad9 Signed-off-by: Fabrice Fontaine Signed-off-by: Peter Korsgaard --- package/libtorrent/libtorrent.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk index c8310cab65..b966a72788 100644 --- a/package/libtorrent/libtorrent.mk +++ b/package/libtorrent/libtorrent.mk @@ -14,6 +14,11 @@ LIBTORRENT_INSTALL_STAGING = YES LIBTORRENT_LICENSE = GPL-2.0 LIBTORRENT_LICENSE_FILES = COPYING +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +LIBTORRENT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lexecinfo" +LIBTORRENT_DEPENDENCIES += libexecinfo +endif + ifeq ($(BR2_PACKAGE_OPENSSL),y) LIBTORRENT_CONF_OPTS += --enable-openssl LIBTORRENT_DEPENDENCIES += openssl