summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch52
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.6.2.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch b/meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch
new file mode 100644
index 0000000000..fdadcd3b25
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch
@@ -0,0 +1,52 @@
1From 87d24ee47fd0e0461fca32d17564f21d76cbcb92 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Fri, 24 Mar 2023 16:18:44 +0000
4Subject: [PATCH] src/Gtrace: remove unguarded print() calls
5
6There is a use of printf() without #include stdio.h in src/arm/Gtrace.c,
7which results in a compiler error if clang 16 is used:
8
9src/arm/Gtrace.c:529:7: error: call to undeclared library function
10'printf' with type 'int (const char *, ...)'; ISO C99 and later do not
11support implicit function declarations [-Wimplicit-function-declaration]
12
13Replace the printf("XXX") with a Dprintf, so it doesn't pull stdio in
14unless in a debug build, and reword the message to be clearer.
15
16Also there is another printf("XXX") inside a FreeBSD-specific block in
17the UNW_ARM_FRAME_SIGRETURN case, replace this with a #error as the code
18needs to be implemented.
19
20Fixes #482.
21
22Upstream-Status: Submitted [https://github.com/libunwind/libunwind/pull/483]
23Signed-off-by: Ross Burton <ross.burton@arm.com>
24---
25 src/arm/Gtrace.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/src/arm/Gtrace.c b/src/arm/Gtrace.c
29index 51fc281d..9e0f25af 100644
30--- a/src/arm/Gtrace.c
31+++ b/src/arm/Gtrace.c
32@@ -514,7 +514,7 @@ tdep_trace (unw_cursor_t *cursor, void **buffer, int *size)
33 if (likely(ret >= 0))
34 ACCESS_MEM_FAST(ret, c->validate, d, cfa + LINUX_SC_LR_OFF, lr);
35 #elif defined(__FreeBSD__)
36- printf("XXX\n");
37+ #error implement UNW_ARM_FRAME_SIGRETURN on FreeBSD
38 #endif
39
40 /* Resume stack at signal restoration point. The stack is not
41@@ -526,7 +526,7 @@ tdep_trace (unw_cursor_t *cursor, void **buffer, int *size)
42 break;
43
44 case UNW_ARM_FRAME_SYSCALL:
45- printf("XXX1\n");
46+ Dprintf ("%s: implement me\n", __FUNCTION__);
47 break;
48
49 default:
50--
512.34.1
52
diff --git a/meta/recipes-support/libunwind/libunwind_1.6.2.bb b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
index 716be9a452..d67862608c 100644
--- a/meta/recipes-support/libunwind/libunwind_1.6.2.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
@@ -5,6 +5,7 @@ SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV
5 file://0004-Fix-build-on-mips-musl.patch \ 5 file://0004-Fix-build-on-mips-musl.patch \
6 file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \ 6 file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
7 file://0006-Fix-for-X32.patch \ 7 file://0006-Fix-for-X32.patch \
8 file://0001-src-Gtrace-remove-unguarded-print-calls.patch \
8 " 9 "
9SRC_URI:append:libc-musl = " file://musl-header-conflict.patch" 10SRC_URI:append:libc-musl = " file://musl-header-conflict.patch"
10 11