From abbee9b35f42f490af7e63303c2240cf7b2a0cf8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 12 Mar 2021 23:36:38 -0800 Subject: ltrace: Fix build on ppc64le/musl Signed-off-by: Khem Raj --- .../ltrace/ltrace/add_ppc64le.patch | 39 ++++++++++++++++++++++ meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch (limited to 'meta-oe/recipes-devtools') diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch new file mode 100644 index 0000000000..dff61b1502 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch @@ -0,0 +1,39 @@ +--- a/sysdeps/linux-gnu/ppc/ptrace.h ++++ b/sysdeps/linux-gnu/ppc/ptrace.h +@@ -18,4 +18,5 @@ + * 02110-1301 USA + */ + ++#include + #include +--- a/sysdeps/linux-gnu/ppc/regs.c ++++ b/sysdeps/linux-gnu/ppc/regs.c +@@ -23,11 +23,14 @@ + + #include "config.h" + ++#include + #include + #include + #include + #include ++#ifdef HAVE_ERROR_H + #include ++#endif + + #include "proc.h" + #include "common.h" +@@ -49,8 +52,11 @@ get_instruction_pointer(struct process * + void + set_instruction_pointer(struct process *proc, void *addr) + { +- if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0) +- error(0, errno, "set_instruction_pointer"); ++ if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){ ++ report_global_error("%s: set_instruction_pointer", ++ strerror(errno)); ++ exit(1); ++ } + } + + void * diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 5710943d74..17264cef5e 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -30,6 +30,8 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http file://0001-Bug-fix-for-data-type-length-judgment.patch \ file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ " +SRC_URI_append_libc-musl = " file://add_ppc64le.patch" + S = "${WORKDIR}/git" inherit autotools -- cgit v1.2.3-54-g00ecf