Skip to contentSkip to conversation

package/uftrace: bump to version 0.20

PATCH New Yegor Yefremov via buildroot 1 participant 2 messages Nov 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/uftrace: bump to version 0.20

Version 0.14 fails to build with musl and GCC >= 14:

cmds/dump.c:1179:25: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] cmds/dump.c:1179:25: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]

musl 1.2.5 no longer declares basename() in <string.h>. Upstream replaced basename() with its own uftrace_basename() in version 0.16.

Release notes:
https://github.com/namhyung/uftrace/releases/tag/v0.15
https://github.com/namhyung/uftrace/releases/tag/v0.16
https://github.com/namhyung/uftrace/releases/tag/v0.17
https://github.com/namhyung/uftrace/releases/tag/v0.18
https://github.com/namhyung/uftrace/releases/tag/v0.19
https://github.com/namhyung/uftrace/releases/tag/v0.20

Drop the ADDR_NO_RANDOMIZE patch: the upstream pull request was closed, and uClibc-ng now defines ADDR_NO_RANDOMIZE in <sys/personality.h>.

Disable the newly added optional libunwind, libtraceevent and liblzma support, which configure would otherwise detect automatically.

This issue has been present since commit f7f03445cf32 ("package/musl:
bump to version 1.2.5"), which removed the basename() declaration from <string.h>. GCC 14, which turns implicit function declarations into errors, was added in the same release. It therefore affects 2024.05 and later, including all maintained branches.

Fixes:
https://autobuild.buildroot.org/results/791c3b45b9c6184c6fc6183c8040486792fa75a3

Fixes f7f03445cf320adbbc41270a806b38c911d3454a ("package/musl: bump to version 1.2.5")
Assisted-by Claude:claude-opus-5-5
---
 ...place-ADDR_NO_RANDOMIZE-by-its-value.patch | 34 -------------------
 package/uftrace/uftrace.hash                  |  2 +-
 package/uftrace/uftrace.mk                    |  7 ++--
 3 files changed, 6 insertions(+), 37 deletions(-)
 delete mode 100644 package/uftrace/0001-cmds-records-replace-ADDR_NO_RANDOMIZE-by-its-value.patch
package/uftrace/0001-cmds-records-replace-ADDR_NO_RANDOMIZE-by-its-value.patch deleted +0 -34
deleted file mode 100644
index 2855be0d9e..0000000000
@@ -1,34 +0,0 @@
-From dc0a75b1679debbc3712b262e5127e90961f92db Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-Date: Fri, 23 Apr 2021 22:57:56 +0200
-Subject: [PATCH] cmds/records: replace ADDR_NO_RANDOMIZE by its value
-
-uClibc-ng lacks the definition of ADDR_NO_RANDOMIZE, causing a build
-failure. A patch was submitted to upstream uClibc-ng to address this
-issue, but in the mean time, use an hardcoded value.
-
-Using a #ifdef ... #endif test doesn't work as this value is defined
-through an enum in glibc.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-Upstream: https://github.com/namhyung/uftrace/pull/1389
----
- cmds/record.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmds/record.c b/cmds/record.c
-index e750f053..fc4eaed4 100644
---- a/cmds/record.c
-+++ b/cmds/record.c
-@@ -2110,7 +2110,7 @@ int do_child_exec(int ready, struct opts *opts,
- 
- 	if (opts->no_randomize_addr) {
- 		/* disable ASLR (Address Space Layout Randomization) */
--		if (personality(ADDR_NO_RANDOMIZE) < 0)
-+		if (personality(0x0040000 /* ADDR_NO_RANDOMIZE */) < 0)
- 			pr_dbg("disabling ASLR failed\n");
- 	}
- 
--- 
-2.30.2
-
package/uftrace/uftrace.hash +1 -1
index c4aad39016..d23ef78853 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  b81255bc288e79e96a5b158d4875fa6425ad51c85f4c4c8523c1defb9366ad12  uftrace-0.14.tar.gz
+sha256  03189061130693b274a4d0af47c4a3135d4a496ca111b78233593bfcb3d3720f  uftrace-0.20.tar.gz
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/uftrace/uftrace.mk +5 -2
index c005a32b76..7ee9381554 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-UFTRACE_VERSION = 0.14
+UFTRACE_VERSION = 0.20
 UFTRACE_SITE = $(call github,namhyung,uftrace,v$(UFTRACE_VERSION))
 UFTRACE_LICENSE = GPL-2.0
 UFTRACE_LICENSE_FILES = COPYING
@@ -13,7 +13,10 @@ UFTRACE_CONFIGURE_OPTS = \
 	--without-libpython \
 	--without-libluajit \
 	--without-libncurses \
-	--without-capstone
+	--without-libunwind \
+	--without-capstone \
+	--without-libtraceevent \
+	--without-liblzma
 
 ifeq ($(BR2_i386),y)
 UFTRACE_ARCH = i386
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/uftrace: enable on riscv64

uftrace supports riscv64 since version 0.15. Its arch/riscv64 code saves and restores the fa0-fa7 registers with fsd/fld and reads floating-point arguments from them, so it requires the lp64d ABI.

Assisted-by Claude:claude-opus-5-5
---
 package/uftrace/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/uftrace/Config.in +3 -0
index 6ec2761fa8..2513a3f7d1 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS
 	default y if BR2_ARM_CPU_ARMV6 || BR2_ARM_CPU_ARMV7A
 	default y if BR2_aarch64
 	default y if BR2_i386
+	# arch/riscv64 saves and restores fa0-fa7 and reads floating-point
+	# arguments from them, so it needs the lp64d ABI
+	default y if BR2_RISCV_64 && BR2_RISCV_ABI_LP64D
 	default y if BR2_x86_64
 
 config BR2_PACKAGE_UFTRACE
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot