diff options
Diffstat (limited to 'meta-oe/recipes-devtools/ltrace')
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch | 86 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch | 27 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch | 34 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch | 86 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb (renamed from meta-oe/recipes-devtools/ltrace/ltrace_git.bb) | 11 |
5 files changed, 125 insertions, 119 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch deleted file mode 100644 index 61932269bd..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | From 491b3b153f6b5cbf2d23a9778e5676eb29a6705f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 6 Feb 2023 16:37:19 -0800 | ||
| 4 | Subject: [PATCH] Fix type of single bit bitfields | ||
| 5 | |||
| 6 | clang16 warns | ||
| 7 | trace.c:311:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] | ||
| 8 | |||
| 9 | quash the warning by using an unsigned type to allow | ||
| 10 | an assignment of 0 or 1 without implicit conversion. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | library.h | 6 +++--- | ||
| 16 | prototype.h | 2 +- | ||
| 17 | sysdeps/linux-gnu/trace.h | 10 +++++----- | ||
| 18 | 3 files changed, 9 insertions(+), 9 deletions(-) | ||
| 19 | |||
| 20 | --- a/library.h | ||
| 21 | +++ b/library.h | ||
| 22 | @@ -71,20 +71,20 @@ struct library_symbol { | ||
| 23 | * looking up one in LIB->protolib. */ | ||
| 24 | struct prototype *proto; | ||
| 25 | |||
| 26 | - int own_name : 1; | ||
| 27 | + unsigned int own_name : 1; | ||
| 28 | |||
| 29 | /* This is relevant for PLT symbols. Latent PLT symbols are | ||
| 30 | * those that don't match any of the -e rules, but that might | ||
| 31 | * potentially become active if a library implementing them | ||
| 32 | * appears that matches a -l rule. Ltrace core is responsible | ||
| 33 | * for clearing latent flag. */ | ||
| 34 | - int latent : 1; | ||
| 35 | + unsigned latent : 1; | ||
| 36 | |||
| 37 | /* Delayed symbols are those for which a breakpoint shouldn't | ||
| 38 | * be enabled yet. They are similar to latent symbols, but | ||
| 39 | * backend is responsible for clearing the delayed flag. See | ||
| 40 | * proc_activate_delayed_symbol. */ | ||
| 41 | - int delayed : 1; | ||
| 42 | + unsigned int delayed : 1; | ||
| 43 | |||
| 44 | struct arch_library_symbol_data arch; | ||
| 45 | struct os_library_symbol_data os; | ||
| 46 | --- a/prototype.h | ||
| 47 | +++ b/prototype.h | ||
| 48 | @@ -162,7 +162,7 @@ struct protolib_cache { | ||
| 49 | |||
| 50 | /* For tracking uses of cache during cache's own | ||
| 51 | * initialization. */ | ||
| 52 | - int bootstrap : 1; | ||
| 53 | + unsigned int bootstrap : 1; | ||
| 54 | }; | ||
| 55 | |||
| 56 | /* Initialize CACHE. Returns 0 on success or a negative value on | ||
| 57 | --- a/sysdeps/linux-gnu/trace.h | ||
| 58 | +++ b/sysdeps/linux-gnu/trace.h | ||
| 59 | @@ -33,11 +33,11 @@ | ||
| 60 | struct pid_task { | ||
| 61 | pid_t pid; /* This may be 0 for tasks that exited | ||
| 62 | * mid-handling. */ | ||
| 63 | - int sigstopped : 1; | ||
| 64 | - int got_event : 1; | ||
| 65 | - int delivered : 1; | ||
| 66 | - int vforked : 1; | ||
| 67 | - int sysret : 1; | ||
| 68 | + unsigned int sigstopped : 1; | ||
| 69 | + unsigned int got_event : 1; | ||
| 70 | + unsigned int delivered : 1; | ||
| 71 | + unsigned int vforked : 1; | ||
| 72 | + unsigned int sysret : 1; | ||
| 73 | }; | ||
| 74 | |||
| 75 | struct pid_set { | ||
| 76 | --- a/sysdeps/linux-gnu/trace.c | ||
| 77 | +++ b/sysdeps/linux-gnu/trace.c | ||
| 78 | @@ -1043,7 +1043,7 @@ ltrace_exiting_install_handler(struct pr | ||
| 79 | struct process_vfork_handler | ||
| 80 | { | ||
| 81 | struct event_handler super; | ||
| 82 | - int vfork_bp_refd:1; | ||
| 83 | + unsigned int vfork_bp_refd:1; | ||
| 84 | }; | ||
| 85 | |||
| 86 | static Event * | ||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch deleted file mode 100644 index f3a6d9e599..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From c1d3aaf5ec810c2594938438c7b4ccd20943f255 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 7 Jul 2017 10:20:52 -0700 | ||
| 4 | Subject: [PATCH] configure: Recognise linux-musl as a host OS | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | Upstream-Status: Pending | ||
| 9 | |||
| 10 | configure.ac | 1 + | ||
| 11 | 1 file changed, 1 insertion(+) | ||
| 12 | |||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index 3e8667f..95d6642 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -35,6 +35,7 @@ AC_CANONICAL_HOST | ||
| 18 | case "${host_os}" in | ||
| 19 | linux-gnu*) HOST_OS="linux-gnu" ;; | ||
| 20 | linux-uclibc*) HOST_OS="linux-gnu" ;; | ||
| 21 | + linux-musl*) HOST_OS="linux-gnu" ;; | ||
| 22 | *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;; | ||
| 23 | esac | ||
| 24 | AC_SUBST(HOST_OS) | ||
| 25 | -- | ||
| 26 | 2.13.2 | ||
| 27 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch new file mode 100644 index 0000000000..e7aa0fdabe --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From d568c0cbdecf31a7020f2a0574470d014f447a86 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <khem.raj@oss.qualcomm.com> | ||
| 3 | Date: Sun, 12 Apr 2026 00:07:06 -0700 | ||
| 4 | Subject: [PATCH] dwarf_prototypes: return NULL from NEXT_SIBLING on error | ||
| 5 | |||
| 6 | NEXT_SIBLING is used in functions that return pointers, so returning | ||
| 7 | false on error is misleading and relies on implicit conversion. | ||
| 8 | Return (void *)0 instead to make the failure value explicit and match | ||
| 9 | the surrounding function return type. | ||
| 10 | |||
| 11 | This is flagged by clang-22 due to | ||
| 12 | Replacing return false with return (void *)0 | ||
| 13 | avoids clang's -Wbool-conversion error when the macro expands | ||
| 14 | inside functions returning a pointer type. | ||
| 15 | |||
| 16 | Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/30] | ||
| 17 | Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> | ||
| 18 | --- | ||
| 19 | dwarf_prototypes.c | 2 +- | ||
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c | ||
| 23 | index bfac177..e7ea1bc 100644 | ||
| 24 | --- a/dwarf_prototypes.c | ||
| 25 | +++ b/dwarf_prototypes.c | ||
| 26 | @@ -36,7 +36,7 @@ | ||
| 27 | #define NEXT_SIBLING(die) \ | ||
| 28 | int res = dwarf_siblingof(die, die); \ | ||
| 29 | if (res == 0) continue; /* sibling exists */ \ | ||
| 30 | - if (res < 0) return false; /* error */ \ | ||
| 31 | + if (res < 0) return (void *)0; /* error */ \ | ||
| 32 | break /* no sibling exists */ | ||
| 33 | |||
| 34 | static struct arg_type_info *get_type(int *newly_allocated_info, | ||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch new file mode 100644 index 0000000000..0f8a9766f4 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | From 65c5a621a366a25b8572cd29c01b4aa92c02903a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <khem.raj@oss.qualcomm.com> | ||
| 3 | Date: Sun, 12 Apr 2026 00:46:20 -0700 | ||
| 4 | Subject: [PATCH] trace: fix 1-bit bitfield assignments for clang | ||
| 5 | -Wsingle-bit-bitfield-constant-conversion | ||
| 6 | |||
| 7 | Replace '1' with 'true' for all 1-bit signed bitfield assignments. | ||
| 8 | Assigning integer 1 to a 1-bit signed bitfield truncates to -1; using | ||
| 9 | 'true' which is a bool is well-defined and avoids the clang error. | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/30] | ||
| 12 | Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> | ||
| 13 | --- | ||
| 14 | ltrace-elf.c | 2 +- | ||
| 15 | sysdeps/linux-gnu/trace.c | 12 ++++++------ | ||
| 16 | 2 files changed, 7 insertions(+), 7 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/ltrace-elf.c b/ltrace-elf.c | ||
| 19 | index beaf69f..2be609c 100644 | ||
| 20 | --- a/ltrace-elf.c | ||
| 21 | +++ b/ltrace-elf.c | ||
| 22 | @@ -819,7 +819,7 @@ mark_chain_latent(struct library_symbol *libsym) | ||
| 23 | { | ||
| 24 | for (; libsym != NULL; libsym = libsym->next) { | ||
| 25 | debug(DEBUG_FUNCTION, "marking %s latent", libsym->name); | ||
| 26 | - libsym->latent = 1; | ||
| 27 | + libsym->latent = true; | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c | ||
| 32 | index 12c8747..b7f4c57 100644 | ||
| 33 | --- a/sysdeps/linux-gnu/trace.c | ||
| 34 | +++ b/sysdeps/linux-gnu/trace.c | ||
| 35 | @@ -310,13 +310,13 @@ send_sigstop(struct process *task, void *data) | ||
| 36 | * weed out unnecessary looping. */ | ||
| 37 | if (st == PS_SLEEPING | ||
| 38 | && is_vfork_parent(task)) { | ||
| 39 | - task_info->vforked = 1; | ||
| 40 | + task_info->vforked = true; | ||
| 41 | return CBS_CONT; | ||
| 42 | } | ||
| 43 | |||
| 44 | if (task_kill(task->pid, SIGSTOP) >= 0) { | ||
| 45 | debug(DEBUG_PROCESS, "send SIGSTOP to %d", task->pid); | ||
| 46 | - task_info->sigstopped = 1; | ||
| 47 | + task_info->sigstopped = true; | ||
| 48 | } else | ||
| 49 | fprintf(stderr, | ||
| 50 | "Warning: couldn't send SIGSTOP to %d\n", task->pid); | ||
| 51 | @@ -442,7 +442,7 @@ handle_stopping_event(struct pid_task *task_info, Event **eventp) | ||
| 52 | { | ||
| 53 | /* Mark all events, so that we know whom to SIGCONT later. */ | ||
| 54 | if (task_info != NULL) | ||
| 55 | - task_info->got_event = 1; | ||
| 56 | + task_info->got_event = true; | ||
| 57 | |||
| 58 | Event *event = *eventp; | ||
| 59 | |||
| 60 | @@ -454,7 +454,7 @@ handle_stopping_event(struct pid_task *task_info, Event **eventp) | ||
| 61 | debug(DEBUG_PROCESS, "SIGSTOP delivered to %d", task_info->pid); | ||
| 62 | if (task_info->sigstopped | ||
| 63 | && !task_info->delivered) { | ||
| 64 | - task_info->delivered = 1; | ||
| 65 | + task_info->delivered = true; | ||
| 66 | *eventp = NULL; // sink the event | ||
| 67 | } else | ||
| 68 | fprintf(stderr, "suspicious: %d got SIGSTOP, but " | ||
| 69 | @@ -748,7 +748,7 @@ process_stopping_on_event(struct event_handler *super, Event *event) | ||
| 70 | debug(1, "%d LT_EV_SYSRET", event->proc->pid); | ||
| 71 | event_to_queue = 0; | ||
| 72 | if (task_info != NULL) | ||
| 73 | - task_info->sysret = 1; | ||
| 74 | + task_info->sysret = true; | ||
| 75 | } | ||
| 76 | |||
| 77 | switch (state) { | ||
| 78 | @@ -1070,7 +1070,7 @@ process_vfork_on_event(struct event_handler *super, Event *event) | ||
| 79 | &event->e_un.brk_addr, &sbp); | ||
| 80 | assert(sbp != NULL); | ||
| 81 | breakpoint_turn_on(sbp, proc->leader); | ||
| 82 | - self->vfork_bp_refd = 1; | ||
| 83 | + self->vfork_bp_refd = true; | ||
| 84 | } | ||
| 85 | break; | ||
| 86 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb index f84d989eef..77bb61830b 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb | |||
| @@ -9,25 +9,24 @@ HOMEPAGE = "http://ltrace.org/" | |||
| 9 | LICENSE = "GPL-2.0-only" | 9 | LICENSE = "GPL-2.0-only" |
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" |
| 11 | 11 | ||
| 12 | PE = "1" | 12 | PE = "2" |
| 13 | PV = "7.91+git" | 13 | SRCREV = "7ef6e6097586b751cce298c256a919404dab259d" |
| 14 | SRCREV = "8eabf684ba6b11ae7a1a843aca3c0657c6329d73" | ||
| 15 | 14 | ||
| 16 | DEPENDS = "elfutils" | 15 | DEPENDS = "elfutils" |
| 17 | SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main \ | 16 | SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main;tag=${PV} \ |
| 18 | file://configure-allow-to-disable-selinux-support.patch \ | 17 | file://configure-allow-to-disable-selinux-support.patch \ |
| 19 | file://0001-Use-correct-enum-type.patch \ | 18 | file://0001-Use-correct-enum-type.patch \ |
| 20 | file://0002-Fix-const-qualifier-error.patch \ | 19 | file://0002-Fix-const-qualifier-error.patch \ |
| 21 | file://0001-Add-support-for-mips64-n32-n64.patch \ | 20 | file://0001-Add-support-for-mips64-n32-n64.patch \ |
| 22 | file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ | ||
| 23 | file://0001-mips-plt.c-Delete-include-error.h.patch \ | 21 | file://0001-mips-plt.c-Delete-include-error.h.patch \ |
| 24 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ | 22 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ |
| 25 | file://0001-hook-Do-not-append-int-to-std-string.patch \ | 23 | file://0001-hook-Do-not-append-int-to-std-string.patch \ |
| 26 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ | 24 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ |
| 27 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ | 25 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ |
| 28 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ | 26 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ |
| 29 | file://0001-Fix-type-of-single-bit-bitfields.patch \ | ||
| 30 | file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ | 27 | file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ |
| 28 | file://0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch \ | ||
| 29 | file://0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch \ | ||
| 31 | " | 30 | " |
| 32 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" | 31 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" |
| 33 | 32 | ||
