From abeb32772b8b3a144e468e5a27b1a31f646317e4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 23 Jul 2019 19:43:45 -0700 Subject: strace: Upgrade to 5.2 License-Updtate: Copyright years changed https://github.com/strace/strace/commit/4b4a0e5a6e74e16dc2bb9b38d81415d9f57425d2#diff-7116ef0705885343c9e1b2171a06be0e Drop backport patch for mips o32 build fix Refresh patches to apply on 5.2 Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...hen-using-non-glibc-libc-implementation-o.patch | 13 ++- .../strace/strace/0001-mips-o32-fix-build.patch | 98 ---------------------- ...tion-Check-for-mips-and-alpha-before-usin.patch | 6 +- meta/recipes-devtools/strace/strace_4.26.bb | 58 ------------- meta/recipes-devtools/strace/strace_5.2.bb | 57 +++++++++++++ 5 files changed, 64 insertions(+), 168 deletions(-) delete mode 100644 meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch delete mode 100644 meta/recipes-devtools/strace/strace_4.26.bb create mode 100644 meta/recipes-devtools/strace/strace_5.2.bb diff --git a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch index daafceb37b..fb5f72529f 100644 --- a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch +++ b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch @@ -13,22 +13,19 @@ Signed-off-by: Khem Raj ptrace.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -diff --git a/ptrace.h b/ptrace.h -index 89d4b95..b3f45bb 100644 --- a/ptrace.h +++ b/ptrace.h @@ -30,7 +30,13 @@ - # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args - #endif + # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + # endif --#include +#if defined(POWERPC) && !defined(__GLIBC__) +#define pt_regs uapi_pt_regs +#endif -+# include + # include +#if defined(POWERPC) && !defined(__GLIBC__) +# undef pt_regs +#endif - #ifdef HAVE_STRUCT_IA64_FPREG - # undef ia64_fpreg + # ifdef HAVE_STRUCT_IA64_FPREG + # undef ia64_fpreg diff --git a/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch b/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch deleted file mode 100644 index a5dccfb08c..0000000000 --- a/meta/recipes-devtools/strace/strace/0001-mips-o32-fix-build.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 2c8b6de913973274e877639658e9e7273a012adb Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" -Date: Tue, 8 Jan 2019 19:23:44 +0000 -Subject: [PATCH] mips o32: fix build - -Upstream-Status: Backport - -Commit 917c2ccf3a67 "Refactor stack pointers" moved mips_REG_* macros -from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these -macros are no longer used outside syscall.c or files included by -syscall.c, but this caused a build regression on mips o32 because -decode_syscall_subcall() uses mips_REG_SP prior to its definition. - -* syscall.c (decode_syscall_subcall): Move ... -* linux/mips/get_syscall_args.c: ... here. - -Reported-by: Baruch Siach -Fixes: v4.26~61 "Refactor stack pointers" ---- - linux/mips/get_syscall_args.c | 26 ++++++++++++++++++++++++++ - syscall.c | 27 ++------------------------- - 2 files changed, 29 insertions(+), 25 deletions(-) - -diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c -index 387aa852..e2889f98 100644 ---- a/linux/mips/get_syscall_args.c -+++ b/linux/mips/get_syscall_args.c -@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp) - #endif - return 1; - } -+ -+#ifdef SYS_syscall_subcall -+static void -+decode_syscall_subcall(struct tcb *tcp) -+{ -+ if (!scno_is_valid(tcp->u_arg[0])) -+ return; -+ tcp->scno = tcp->u_arg[0]; -+ tcp->qual_flg = qual_flags(tcp->scno); -+ tcp->s_ent = &sysent[tcp->scno]; -+ memmove(&tcp->u_arg[0], &tcp->u_arg[1], -+ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); -+ /* -+ * Fetching the last arg of 7-arg syscalls (fadvise64_64 -+ * and sync_file_range) requires additional code, -+ * see linux/mips/get_syscall_args.c -+ */ -+ if (tcp->s_ent->nargs == MAX_ARGS) { -+ if (umoven(tcp, -+ mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), -+ sizeof(tcp->u_arg[0]), -+ &tcp->u_arg[MAX_ARGS - 1]) < 0) -+ tcp->u_arg[MAX_ARGS - 1] = 0; -+ } -+} -+#endif /* SYS_syscall_subcall */ -diff --git a/syscall.c b/syscall.c -index d78f51dd..51fcc721 100644 ---- a/syscall.c -+++ b/syscall.c -@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp) - #endif /* SYS_ipc_subcall */ - - #ifdef SYS_syscall_subcall --static void --decode_syscall_subcall(struct tcb *tcp) --{ -- if (!scno_is_valid(tcp->u_arg[0])) -- return; -- tcp->scno = tcp->u_arg[0]; -- tcp->qual_flg = qual_flags(tcp->scno); -- tcp->s_ent = &sysent[tcp->scno]; -- memmove(&tcp->u_arg[0], &tcp->u_arg[1], -- sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); --# ifdef LINUX_MIPSO32 -- /* -- * Fetching the last arg of 7-arg syscalls (fadvise64_64 -- * and sync_file_range) requires additional code, -- * see linux/mips/get_syscall_args.c -- */ -- if (tcp->s_ent->nargs == MAX_ARGS) { -- if (umoven(tcp, -- mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), -- sizeof(tcp->u_arg[0]), -- &tcp->u_arg[MAX_ARGS - 1]) < 0) -- tcp->u_arg[MAX_ARGS - 1] = 0; -- } --# endif /* LINUX_MIPSO32 */ --} -+/* The implementation is architecture specific. */ -+static void decode_syscall_subcall(struct tcb *); - #endif /* SYS_syscall_subcall */ - - static void --- -2.17.0 - diff --git a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch index becee79d1a..95d85bf34a 100644 --- a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch +++ b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch @@ -19,16 +19,14 @@ Signed-off-by: Khem Raj tests/sigaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tests/sigaction.c b/tests/sigaction.c -index 95be197..54819f9 100644 --- a/tests/sigaction.c +++ b/tests/sigaction.c @@ -156,7 +156,7 @@ main(void) sigdelset(mask.libc, SIGHUP); memcpy(new_act->mask, mask.old, sizeof(mask.old)); --#ifdef SA_RESTORER +-# ifdef SA_RESTORER +#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA) new_act->flags = SA_RESTORER; new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL; - # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx" + # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx" diff --git a/meta/recipes-devtools/strace/strace_4.26.bb b/meta/recipes-devtools/strace/strace_4.26.bb deleted file mode 100644 index 2688724e66..0000000000 --- a/meta/recipes-devtools/strace/strace_4.26.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "System call tracing tool" -HOMEPAGE = "http://strace.io" -SECTION = "console/utils" -LICENSE = "LGPL-2.1+ & GPL-2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=5c84d1c6e48e7961ccd2cd2ae32f7bf1" - -SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ - file://disable-git-version-gen.patch \ - file://more-robust-test-for-m32-mx32-compile-support.patch \ - file://update-gawk-paths.patch \ - file://Makefile-ptest.patch \ - file://run-ptest \ - file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \ - file://mips-SIGEMT.patch \ - file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ - file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ - file://0001-mips-o32-fix-build.patch \ - file://ptest-spacesave.patch \ - " -SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af" -SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c" - -inherit autotools ptest - -PACKAGECONFIG_class-target ??= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ -" - -PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" - -EXTRA_OECONF += "--enable-mpers=no" - -CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" - -TESTDIR = "tests" -PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" - -do_install_append() { - # We don't ship strace-graph here because it needs perl - rm ${D}${bindir}/strace-graph -} - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} - install -m 755 ${S}/test-driver ${D}${PTEST_PATH} - install -m 644 ${B}/config.h ${D}${PTEST_PATH} - sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile -} - -RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" - -BBCLASSEXTEND = "native" -TOOLCHAIN = "gcc" diff --git a/meta/recipes-devtools/strace/strace_5.2.bb b/meta/recipes-devtools/strace/strace_5.2.bb new file mode 100644 index 0000000000..8367bf1a4f --- /dev/null +++ b/meta/recipes-devtools/strace/strace_5.2.bb @@ -0,0 +1,57 @@ +SUMMARY = "System call tracing tool" +HOMEPAGE = "http://strace.io" +SECTION = "console/utils" +LICENSE = "LGPL-2.1+ & GPL-2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0169a04810830e94f4b1cfb823c9f592" + +SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ + file://disable-git-version-gen.patch \ + file://more-robust-test-for-m32-mx32-compile-support.patch \ + file://update-gawk-paths.patch \ + file://Makefile-ptest.patch \ + file://run-ptest \ + file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \ + file://mips-SIGEMT.patch \ + file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ + file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ + file://ptest-spacesave.patch \ + " +SRC_URI[md5sum] = "b9c02b07dcde5125498ce7da69b77baf" +SRC_URI[sha256sum] = "d513bc085609a9afd64faf2ce71deb95b96faf46cd7bc86048bc655e4e4c24d2" + +inherit autotools ptest + +PACKAGECONFIG_class-target ??= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ +" + +PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" + +EXTRA_OECONF += "--enable-mpers=no" + +CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" + +TESTDIR = "tests" +PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" + +do_install_append() { + # We don't ship strace-graph here because it needs perl + rm ${D}${bindir}/strace-graph +} + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} + install -m 755 ${S}/test-driver ${D}${PTEST_PATH} + install -m 644 ${B}/config.h ${D}${PTEST_PATH} + sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile +} + +RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" + +BBCLASSEXTEND = "native" +TOOLCHAIN = "gcc" -- cgit 1.2.3-korg