diff options
author | Ross Burton <ross.burton@arm.com> | 2023-03-27 12:53:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-28 22:28:45 +0100 |
commit | 22286ed02d2913c2ea70d374e8930dcd511052b7 (patch) | |
tree | 1cc8da07aa92db49f539145a7e7f3563982ef202 /meta | |
parent | 985f1b883fe78af47f0956d9c7b5d5780e1baf0e (diff) | |
download | poky-22286ed02d2913c2ea70d374e8930dcd511052b7.tar.gz |
libunwind: fix compile failures on 32-bit arm with Clang 16
(From OE-Core rev: 47a43ea98dc6cae67730866c47090900572ea6b0)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch | 52 | ||||
-rw-r--r-- | meta/recipes-support/libunwind/libunwind_1.6.2.bb | 1 |
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 @@ | |||
1 | From 87d24ee47fd0e0461fca32d17564f21d76cbcb92 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Fri, 24 Mar 2023 16:18:44 +0000 | ||
4 | Subject: [PATCH] src/Gtrace: remove unguarded print() calls | ||
5 | |||
6 | There is a use of printf() without #include stdio.h in src/arm/Gtrace.c, | ||
7 | which results in a compiler error if clang 16 is used: | ||
8 | |||
9 | src/arm/Gtrace.c:529:7: error: call to undeclared library function | ||
10 | 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not | ||
11 | support implicit function declarations [-Wimplicit-function-declaration] | ||
12 | |||
13 | Replace the printf("XXX") with a Dprintf, so it doesn't pull stdio in | ||
14 | unless in a debug build, and reword the message to be clearer. | ||
15 | |||
16 | Also there is another printf("XXX") inside a FreeBSD-specific block in | ||
17 | the UNW_ARM_FRAME_SIGRETURN case, replace this with a #error as the code | ||
18 | needs to be implemented. | ||
19 | |||
20 | Fixes #482. | ||
21 | |||
22 | Upstream-Status: Submitted [https://github.com/libunwind/libunwind/pull/483] | ||
23 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
24 | --- | ||
25 | src/arm/Gtrace.c | 4 ++-- | ||
26 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/src/arm/Gtrace.c b/src/arm/Gtrace.c | ||
29 | index 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 | -- | ||
51 | 2.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 | " |
9 | SRC_URI:append:libc-musl = " file://musl-header-conflict.patch" | 10 | SRC_URI:append:libc-musl = " file://musl-header-conflict.patch" |
10 | 11 | ||