libtorrent: stop discarding the target build flags

CONFIGURE_VARS is assigned rather than appended to, which discards the
default from package-defaults.mk: the cross compiler settings and the
CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS the build system passes. The
library is configured with autoconf's own -g -O2 and built for the
toolchain's default architecture instead, without the target CPU flags,
the hardening flags and -ffile-prefix-map. On x86/geode that also costs
the 64-bit atomics: at the default -march=i486 the compiler cannot
inline them and emits __atomic_load_8 and __atomic_store_8 calls, so
every binary linking the static library needs libatomic.

Fixes: 13a058bed6 ("libtorrent: update to 0.15.3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
pull/30537/head
Daniel Golle 2026-09-14 16:46:07 +01:00
parent 36c4c3f9d0
commit ae34d29eb6
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libtorrent
PKG_VERSION:=0.15.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent
@ -53,7 +53,7 @@ CONFIGURE_ARGS += \
--with-zlib=$(STAGING_DIR)/usr \
--without-kqueue
CONFIGURE_VARS = \
CONFIGURE_VARS += \
ax_cv_cxx_compile_cxx17=yes
define Build/InstallDev