From 451c4649bbf384cd80af7a1552dc1f656ed2ce90 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 28 Jun 2017 21:59:03 -0700 Subject: strace: upgrade to 4.17 Fix build with upcoming glibc 2.26 (From OE-Core rev: 8a4a62ae44d6819cda77c96a5106b78a83364fd6) Signed-off-by: Khem Raj Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...8-replace-struct-ucontext-with-ucontext_t.patch | 31 ++++++++++++++ .../strace/strace/Makefile-ptest.patch | 19 +++++--- meta/recipes-devtools/strace/strace_4.16.bb | 49 --------------------- meta/recipes-devtools/strace/strace_4.17.bb | 50 ++++++++++++++++++++++ 4 files changed, 94 insertions(+), 55 deletions(-) create mode 100644 meta/recipes-devtools/strace/strace/0008-replace-struct-ucontext-with-ucontext_t.patch delete mode 100644 meta/recipes-devtools/strace/strace_4.16.bb create mode 100644 meta/recipes-devtools/strace/strace_4.17.bb (limited to 'meta/recipes-devtools/strace') diff --git a/meta/recipes-devtools/strace/strace/0008-replace-struct-ucontext-with-ucontext_t.patch b/meta/recipes-devtools/strace/strace/0008-replace-struct-ucontext-with-ucontext_t.patch new file mode 100644 index 0000000000..1985d8104d --- /dev/null +++ b/meta/recipes-devtools/strace/strace/0008-replace-struct-ucontext-with-ucontext_t.patch @@ -0,0 +1,31 @@ +From 07f71a12cb88919c6113284fc43bf4967e5e2bc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 28 Jun 2017 11:36:57 -0700 +Subject: [PATCH 8/8] replace struct ucontext with ucontext_t + +glibc >= 2.26 has dropped the tag struct ucontext +from ucontext_t type + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj +--- + linux/arm/arch_sigreturn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linux/arm/arch_sigreturn.c b/linux/arm/arch_sigreturn.c +index b60dad8..a2b7100 100644 +--- a/linux/arm/arch_sigreturn.c ++++ b/linux/arm/arch_sigreturn.c +@@ -9,7 +9,7 @@ arch_sigreturn(struct tcb *tcp) + #ifdef AARCH64 + tcp->currpers == 0 ? + (*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO + +- offsetof(struct ucontext, uc_sigmask)) : ++ offsetof(ucontext_t, uc_sigmask)) : + #endif + (*arm_sp_ptr + + OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK); +-- +2.13.2 + diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch index 876c2d8629..07ea0b37f2 100644 --- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch +++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch @@ -1,19 +1,23 @@ -strace: Add ptest +From 0574ae9926308dcbca78bd8cd0f0f143f19cbcb5 Mon Sep 17 00:00:00 2001 +From: Gabriel Barbu +Date: Thu, 25 Jul 2013 15:28:33 +0200 +Subject: [PATCH 4/8] strace: Add ptest Upstream-Status: Inappropriate Signed-off-by: Gabriel Barbu Signed-off-by: Chong Lu + --- configure.ac | 2 +- tests/Makefile.am | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index b2b03c6..464a9dc 100644 +index 61d6425..6387c24 100644 --- a/configure.ac +++ b/configure.ac -@@ -39,7 +39,7 @@ AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.]) +@@ -41,7 +41,7 @@ AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.]) AC_CONFIG_SRCDIR([strace.c]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_HEADERS([config.h]) @@ -23,11 +27,11 @@ index b2b03c6..464a9dc 100644 AM_MAINTAINER_MODE AC_CANONICAL_HOST diff --git a/tests/Makefile.am b/tests/Makefile.am -index 311d3bb..72f9022 100644 +index 5aa7f89..a55a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -960,3 +960,21 @@ $(objects): scno.h - CLEANFILES = ksysent.h $(TESTS:=.tmp) +@@ -379,3 +379,21 @@ clean-local-check: + CLEANFILES = ksysent.h include ../scno.am + @@ -48,3 +52,6 @@ index 311d3bb..72f9022 100644 + sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \ + done + for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done +-- +2.13.2 + diff --git a/meta/recipes-devtools/strace/strace_4.16.bb b/meta/recipes-devtools/strace/strace_4.16.bb deleted file mode 100644 index b6cd2ac9b9..0000000000 --- a/meta/recipes-devtools/strace/strace_4.16.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "System call tracing tool" -HOMEPAGE = "http://strace.sourceforge.net" -SECTION = "console/utils" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=488acb3aaaf5d14a2e1a852d13668a70" - -SRC_URI = "${SOURCEFORGE_MIRROR}/strace/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 \ - " - -SRC_URI[md5sum] = "2873366cac98770efcbed6e748d5ef23" -SRC_URI[sha256sum] = "98487cb5178ec1259986cc9f6e2a844f50e5d1208c112cc22431a1e4d9adf0ef" - -inherit autotools ptest bluetooth - -RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" - -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,${BLUEZ}" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" - -TESTDIR = "tests" - -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} - sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile -} - -BBCLASSEXTEND = "native" -TOOLCHAIN = "gcc" diff --git a/meta/recipes-devtools/strace/strace_4.17.bb b/meta/recipes-devtools/strace/strace_4.17.bb new file mode 100644 index 0000000000..72fa994489 --- /dev/null +++ b/meta/recipes-devtools/strace/strace_4.17.bb @@ -0,0 +1,50 @@ +SUMMARY = "System call tracing tool" +HOMEPAGE = "http://strace.sourceforge.net" +SECTION = "console/utils" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=488acb3aaaf5d14a2e1a852d13668a70" + +SRC_URI = "${SOURCEFORGE_MIRROR}/strace/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://0008-replace-struct-ucontext-with-ucontext_t.patch \ + " + +SRC_URI[md5sum] = "8d7eb10eba68bad83a269197e634b626" +SRC_URI[sha256sum] = "81f35b085fbb3cfa806eb521a8522ac3406deaccfe121ce35064bad268237419" + +inherit autotools ptest bluetooth + +RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" + +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,${BLUEZ}" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" + +TESTDIR = "tests" + +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} + sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile +} + +BBCLASSEXTEND = "native" +TOOLCHAIN = "gcc" -- cgit v1.2.3-54-g00ecf