diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-03-12 23:36:38 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-03-13 00:56:14 -0800 |
| commit | abbee9b35f42f490af7e63303c2240cf7b2a0cf8 (patch) | |
| tree | 2e5fc6792c2efa81e89e17eee2b3d2ca3b7671a8 | |
| parent | 7d4174ab0af6fe419580deaf780c0f992f512519 (diff) | |
| download | meta-openembedded-abbee9b35f42f490af7e63303c2240cf7b2a0cf8.tar.gz | |
ltrace: Fix build on ppc64le/musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch | 39 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 2 |
2 files changed, 41 insertions, 0 deletions
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 @@ | |||
| 1 | --- a/sysdeps/linux-gnu/ppc/ptrace.h | ||
| 2 | +++ b/sysdeps/linux-gnu/ppc/ptrace.h | ||
| 3 | @@ -18,4 +18,5 @@ | ||
| 4 | * 02110-1301 USA | ||
| 5 | */ | ||
| 6 | |||
| 7 | +#include <asm/ptrace.h> | ||
| 8 | #include <sys/ptrace.h> | ||
| 9 | --- a/sysdeps/linux-gnu/ppc/regs.c | ||
| 10 | +++ b/sysdeps/linux-gnu/ppc/regs.c | ||
| 11 | @@ -23,11 +23,14 @@ | ||
| 12 | |||
| 13 | #include "config.h" | ||
| 14 | |||
| 15 | +#include <string.h> | ||
| 16 | #include <sys/types.h> | ||
| 17 | #include <sys/ptrace.h> | ||
| 18 | #include <asm/ptrace.h> | ||
| 19 | #include <errno.h> | ||
| 20 | +#ifdef HAVE_ERROR_H | ||
| 21 | #include <error.h> | ||
| 22 | +#endif | ||
| 23 | |||
| 24 | #include "proc.h" | ||
| 25 | #include "common.h" | ||
| 26 | @@ -49,8 +52,11 @@ get_instruction_pointer(struct process * | ||
| 27 | void | ||
| 28 | set_instruction_pointer(struct process *proc, void *addr) | ||
| 29 | { | ||
| 30 | - if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0) | ||
| 31 | - error(0, errno, "set_instruction_pointer"); | ||
| 32 | + if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){ | ||
| 33 | + report_global_error("%s: set_instruction_pointer", | ||
| 34 | + strerror(errno)); | ||
| 35 | + exit(1); | ||
| 36 | + } | ||
| 37 | } | ||
| 38 | |||
| 39 | 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 | |||
| 30 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ | 30 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ |
| 31 | file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ | 31 | file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ |
| 32 | " | 32 | " |
| 33 | SRC_URI_append_libc-musl = " file://add_ppc64le.patch" | ||
| 34 | |||
| 33 | S = "${WORKDIR}/git" | 35 | S = "${WORKDIR}/git" |
| 34 | 36 | ||
| 35 | inherit autotools | 37 | inherit autotools |
