From 0a0f2e884c120dfe146697280127cefcd23cd680 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 6 Aug 2025 04:44:53 -0400 Subject: [PATCH] gperftools: bump to version 2.17 Changelog: https://github.com/gperftools/gperftools/releases/tag/gperftools-2.17 Add patch to fix build of some ARM toolchains Build system: x86/64 Build-tested: x86/64-glibc Run-tested: x86/64-glibc Signed-off-by: John Audia --- libs/gperftools/Makefile | 4 +-- ...c-inl.h-fix-build-for-some-ARM-toolc.patch | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 libs/gperftools/patches/100-stacktrace_libgcc-inl.h-fix-build-for-some-ARM-toolc.patch diff --git a/libs/gperftools/Makefile b/libs/gperftools/Makefile index 92e7e61325..c3bc2eac73 100644 --- a/libs/gperftools/Makefile +++ b/libs/gperftools/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gperftools -PKG_VERSION:=2.16 +PKG_VERSION:=2.17 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/gperftools/gperftools/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? -PKG_HASH:=737be182b4e42f5c7f595da2a7aa59ce0489a73d336d0d16847f2aa52d5221b4 +PKG_HASH:=1ccb7ef8ebd1033906e6247a89992b26986401cc1777c07cc63773463a996072 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=John Audia diff --git a/libs/gperftools/patches/100-stacktrace_libgcc-inl.h-fix-build-for-some-ARM-toolc.patch b/libs/gperftools/patches/100-stacktrace_libgcc-inl.h-fix-build-for-some-ARM-toolc.patch new file mode 100644 index 0000000000..7ae9499c85 --- /dev/null +++ b/libs/gperftools/patches/100-stacktrace_libgcc-inl.h-fix-build-for-some-ARM-toolc.patch @@ -0,0 +1,35 @@ +From 2d277134c4b5c56d1c2912330aa44160af52aadf Mon Sep 17 00:00:00 2001 +From: graysky +Date: Thu, 7 Aug 2025 02:35:01 -0400 +Subject: [PATCH] stacktrace_libgcc-inl.h: fix build for some ARM toolchains + +On OpenWrt when bulding for arm_cortex-a15_neon-vpfv4 or +arm_cortex-a9_vfpv3-d16, the build errors out due to an undefined symbol +_URC_NORMAL_STOP. This usually happens when the required header +(typically ) is not included, or the toolchain's unwind +implementation does not provide this definition. + +Error: +src/stacktrace_libgcc-inl.h: In function '_Unwind_Reason_Code libgcc_backtrace_helper(_Unwind_Context*, void*)': +src/stacktrace_libgcc-inl.h:69:12: error: '_URC_NORMAL_STOP' was not declared in this scope + 69 | return _URC_NORMAL_STOP; + | + +A work-around is to use URC_END_OF_STACK. + +Signed-off-by: graysky +--- + src/stacktrace_libgcc-inl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/stacktrace_libgcc-inl.h ++++ b/src/stacktrace_libgcc-inl.h +@@ -66,7 +66,7 @@ static _Unwind_Reason_Code libgcc_backtr + } + + if (data->pos >= data->limit) { +- return _URC_NORMAL_STOP; ++ return _URC_END_OF_STACK; + } + + void *ip = reinterpret_cast(_Unwind_GetIP(ctx));; -- 2.30.2