summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-devtools/strace
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/strace')
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch25
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch176
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch117
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch198
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch306
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch54
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch69
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch52
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch18
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch20
-rwxr-xr-xyocto-poky/meta/recipes-devtools/strace/strace/git-version-gen225
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch46
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch57
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch118
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch51
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb52
-rw-r--r--yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb51
17 files changed, 1146 insertions, 489 deletions
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
deleted file mode 100644
index 085395990..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From f85854131c8265f2eb59c714dcea5c4b3dc09bed Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen.kooi@linaro.org>
-Date: Wed, 15 Apr 2015 14:29:37 +0200
-Subject: [PATCH] Add linux/aarch64/arch_regs.h
-
-It is missing from the tarball, but it is present in git for v4.10
-
-Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-Upstream-Status: Pending
----
- linux/aarch64/arch_regs.h | 2 ++
- 1 file changed, 2 insertions(+)
- create mode 100644 linux/aarch64/arch_regs.h
-
-diff --git a/linux/aarch64/arch_regs.h b/linux/aarch64/arch_regs.h
-new file mode 100644
-index 0000000..9a5e33e
---- /dev/null
-+++ b/linux/aarch64/arch_regs.h
-@@ -0,0 +1,2 @@
-+extern uint64_t *const aarch64_sp_ptr;
-+extern uint32_t *const arm_sp_ptr;
---
-1.9.3
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
new file mode 100644
index 000000000..aa61e15c8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
@@ -0,0 +1,176 @@
+From f32126ba790dd4e61d43a2140b24f02426297bb6 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 31 Dec 2015 14:19:41 +0000
+Subject: [PATCH] Move gcc compat macros to gcc_compat.h
+
+* defs.h: Include "gcc_compat.h".
+(GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
+ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
+ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ...
+* gcc_compat.h: ... here.
+* Makefile.am (strace_SOURCES): Add gcc_compat.h.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ Makefile.am | 1 +
+ defs.h | 43 +----------------------------------
+ gcc_compat.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 75 insertions(+), 42 deletions(-)
+ create mode 100644 gcc_compat.h
+
+diff --git a/Makefile.am b/Makefile.am
+index ab52778..d43608d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -97,6 +97,7 @@ strace_SOURCES = \
+ flock.c \
+ flock.h \
+ futex.c \
++ gcc_compat.h \
+ get_robust_list.c \
+ getcpu.c \
+ getcwd.c \
+diff --git a/defs.h b/defs.h
+index 283ab1f..bae212c 100644
+--- a/defs.h
++++ b/defs.h
+@@ -55,6 +55,7 @@
+ #include <sys/syscall.h>
+
+ #include "mpers_type.h"
++#include "gcc_compat.h"
+
+ #ifndef HAVE_STRERROR
+ const char *strerror(int);
+@@ -68,48 +69,6 @@ const char *strerror(int);
+ extern char *stpcpy(char *dst, const char *src);
+ #endif
+
+-#if defined __GNUC__ && defined __GNUC_MINOR__
+-# define GNUC_PREREQ(maj, min) \
+- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+-#else
+-# define __attribute__(x) /* empty */
+-# define GNUC_PREREQ(maj, min) 0
+-#endif
+-
+-#if GNUC_PREREQ(2, 5)
+-# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
+-#else
+-# define ATTRIBUTE_NORETURN /* empty */
+-#endif
+-
+-#if GNUC_PREREQ(2, 7)
+-# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
+-# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
+-# define ATTRIBUTE_PACKED __attribute__((__packed__))
+-#else
+-# define ATTRIBUTE_FORMAT(args) /* empty */
+-# define ATTRIBUTE_ALIGNED(arg) /* empty */
+-# define ATTRIBUTE_PACKED /* empty */
+-#endif
+-
+-#if GNUC_PREREQ(3, 0)
+-# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
+-#else
+-# define ATTRIBUTE_MALLOC /* empty */
+-#endif
+-
+-#if GNUC_PREREQ(3, 1)
+-# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
+-#else
+-# define ATTRIBUTE_NOINLINE /* empty */
+-#endif
+-
+-#if GNUC_PREREQ(4, 3)
+-# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
+-#else
+-# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
+-#endif
+-
+ #ifndef offsetof
+ # define offsetof(type, member) \
+ (((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL))
+diff --git a/gcc_compat.h b/gcc_compat.h
+new file mode 100644
+index 0000000..1f2c835
+--- /dev/null
++++ b/gcc_compat.h
+@@ -0,0 +1,73 @@
++/*
++ * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef GCC_COMPAT_H_
++#define GCC_COMPAT_H_
++
++#if defined __GNUC__ && defined __GNUC_MINOR__
++# define GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++# define __attribute__(x) /* empty */
++# define GNUC_PREREQ(maj, min) 0
++#endif
++
++#if GNUC_PREREQ(2, 5)
++# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
++#else
++# define ATTRIBUTE_NORETURN /* empty */
++#endif
++
++#if GNUC_PREREQ(2, 7)
++# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
++# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
++# define ATTRIBUTE_PACKED __attribute__((__packed__))
++#else
++# define ATTRIBUTE_FORMAT(args) /* empty */
++# define ATTRIBUTE_ALIGNED(arg) /* empty */
++# define ATTRIBUTE_PACKED /* empty */
++#endif
++
++#if GNUC_PREREQ(3, 0)
++# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
++#else
++# define ATTRIBUTE_MALLOC /* empty */
++#endif
++
++#if GNUC_PREREQ(3, 1)
++# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
++#else
++# define ATTRIBUTE_NOINLINE /* empty */
++#endif
++
++#if GNUC_PREREQ(4, 3)
++# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
++#else
++# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
++#endif
++
++#endif
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
new file mode 100644
index 000000000..a9d32037b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
@@ -0,0 +1,117 @@
+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 24 Dec 2015 15:40:55 +0000
+Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
+
+Fix build regression introduced by commit
+34683e3926d8c2daa368afb805da422ee7043396.
+
+* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
+* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
+* linux/nios2/syscallent.h: Likewise.
+* linux/or1k/syscallent.h: Likewise.
+* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
+* NEWS: Mention this build fix.
+
+Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ NEWS | 3 +++
+ linux/32/syscallent.h | 6 +++---
+ linux/arc/syscallent.h | 2 +-
+ linux/nios2/syscallent.h | 2 +-
+ linux/or1k/syscallent.h | 2 +-
+ linux/tile/syscallent1.h | 2 +-
+ pathtrace.c | 1 +
+ 7 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index fe40ca4..09263eb 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,9 @@
++Noteworthy changes in release ?.?? (????-??-??)
++===============================================
++
++* Bug fixes
++ * Fixed build on arc, metag, nios2, or1k, and tile architectures.
++
+ Noteworthy changes in release 4.11 (2015-12-21)
+ ===============================================
+
+diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h
+index 5f997e7..e6f895c 100644
+--- a/linux/32/syscallent.h
++++ b/linux/32/syscallent.h
+@@ -1,5 +1,5 @@
+-#ifndef ARCH_mmap
+-# define ARCH_mmap mmap
++#ifndef sys_ARCH_mmap
++# define sys_ARCH_mmap sys_mmap
+ #endif
+ [ 0] = { 2, 0, SEN(io_setup), "io_setup" },
+ [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" },
+@@ -276,5 +276,5 @@
+ [283] = { 2, 0, SEN(membarrier), "membarrier", },
+ [284] = { 3, TM, SEN(mlock2), "mlock2" },
+
+-#undef ARCH_mmap
++#undef sys_ARCH_mmap
+ #undef ARCH_WANT_SYNC_FILE_RANGE2
+diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
+index 5847dc4..1100008 100644
+--- a/linux/arc/syscallent.h
++++ b/linux/arc/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3, 0, SEN(printargs), "arc_cacheflush"},
+ [245] = { 1, 0, SEN(printargs), "arc_settls" },
+diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h
+index 8a4b70e..01efe3a 100644
+--- a/linux/nios2/syscallent.h
++++ b/linux/nios2/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = {4, 0, SEN(cacheflush), "cacheflush"},
+ [245 ... 259] = { },
+diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
+index ed84b3b..351fe25 100644
+--- a/linux/or1k/syscallent.h
++++ b/linux/or1k/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" },
+ [245 ... 259] = { },
+diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
+index c86f059..28dbab4 100644
+--- a/linux/tile/syscallent1.h
++++ b/linux/tile/syscallent1.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_4koff
++#define sys_ARCH_mmap sys_mmap_4koff
+ #define ARCH_WANT_SYNC_FILE_RANGE2 1
+ #include "32/syscallent.h"
+ [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" },
+diff --git a/pathtrace.c b/pathtrace.c
+index d530ec2..e72cdf7 100644
+--- a/pathtrace.c
++++ b/pathtrace.c
+@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp)
+ case SEN_mmap:
+ case SEN_mmap_4koff:
+ case SEN_mmap_pgoff:
++ case SEN_ARCH_mmap:
+ /* x, x, x, x, fd */
+ return fdmatch(tcp, tcp->u_arg[4]);
+
+--
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
new file mode 100644
index 000000000..c4e645b81
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
@@ -0,0 +1,198 @@
+From 3fdcdd47c6a67585123a0a0c8fffabcc9f79a3a2 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Tue, 12 Jan 2016 14:47:12 +0000
+Subject: [PATCH] scm_rights-fd.test: rewrite without fork
+
+* tests/scm_rights.c (main): Rewrite without fork.
+Place all objects passed to sendmsg and recvmsg at the end
+of memory pages followed by inaccessible pages.
+* tests/scm_rights-fd.test: Update.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/scm_rights-fd.test | 12 ++---
+ tests/scm_rights.c | 122 ++++++++++++++++++++++-------------------------
+ 2 files changed, 63 insertions(+), 71 deletions(-)
+
+diff --git a/tests/scm_rights-fd.test b/tests/scm_rights-fd.test
+index a32ef36..48c5028 100755
+--- a/tests/scm_rights-fd.test
++++ b/tests/scm_rights-fd.test
+@@ -49,18 +49,18 @@ touch -- "$file" ||
+ framework_skip_ 'failed to create a file'
+
+ run_prog ./scm_rights /dev/zero
+-run_strace_merge -y -x -enetwork $args "$file"
++run_strace -y -x -enetwork $args "$file"
+
++sample='\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff'
+ n='[1-9][0-9]*'
+-msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n"
+-rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3</dev/null>, 4</dev/zero>, 5</[^}>]*/(A\\n){127}Z>\]\}'
++msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"'"$sample"'", 15\}\], msg_controllen='"$n"
++rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[4</dev/null>, 5</dev/zero>, 6</[^}>]*/(A\\n){127}Z>\]\}'
+ creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}'
+-prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
+ EXPECTED="$LOG.expected"
+
+ cat > "$EXPECTED" << __EOF__
+-${prefix}sendmsg\\(1<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n
+-${prefix}recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n
++sendmsg\\(3<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15
++recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15
+ __EOF__
+
+ match_grep "$LOG" "$EXPECTED"
+diff --git a/tests/scm_rights.c b/tests/scm_rights.c
+index 1e5e850..00af4d5 100644
+--- a/tests/scm_rights.c
++++ b/tests/scm_rights.c
+@@ -27,26 +27,39 @@
+
+ #include "tests.h"
+ #include <assert.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <sys/socket.h>
+-#include <sys/wait.h>
+
+ int main(int ac, const char **av)
+ {
+- int i;
+- int data = 0;
+- struct iovec iov = {
+- .iov_base = &data,
+- .iov_len = sizeof(iov)
+- };
++ assert(ac > 0);
++ int fds[ac];
++
++ static const char sample[] =
++ "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff";
++ const unsigned int data_size = sizeof(sample) - 1;
++ void *data = tail_alloc(data_size);
++ memcpy(data, sample, data_size);
++
++ struct iovec *iov = tail_alloc(sizeof(struct iovec));
++ iov->iov_base = data;
++ iov->iov_len = data_size;
+
+- while ((i = open("/dev/null", O_RDWR)) < 3)
++ struct msghdr *mh = tail_alloc(sizeof(struct msghdr));
++ memset(mh, 0, sizeof(*mh));
++ mh->msg_iov = iov;
++ mh->msg_iovlen = 1;
++
++ int i;
++ while ((i = open("/dev/null", O_RDWR)) <= ac + 2)
+ assert(i >= 0);
+- (void) close(3);
++ while (i > 2)
++ assert(close(i--) == 0);
++ assert(close(0) == 0);
+
+ int sv[2];
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
+@@ -55,60 +68,39 @@ int main(int ac, const char **av)
+ if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
+ perror_msg_and_skip("setsockopt");
+
+- pid_t pid = fork();
+- if (pid < 0)
+- perror_msg_and_fail("fork");
+-
+- if (pid) {
+- assert(close(sv[0]) == 0);
+- assert(dup2(sv[1], 1) == 1);
+- assert(close(sv[1]) == 0);
+-
+- int fds[ac];
+- assert((fds[0] = open("/dev/null", O_RDWR)) == 3);
+- for (i = 1; i < ac; ++i)
+- assert((fds[i] = open(av[i], O_RDONLY)) == i + 3);
+-
+- union {
+- struct cmsghdr cmsg;
+- char buf[CMSG_LEN(sizeof(fds))];
+- } control;
+-
+- control.cmsg.cmsg_level = SOL_SOCKET;
+- control.cmsg.cmsg_type = SCM_RIGHTS;
+- control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds));
+- memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds));
+-
+- struct msghdr mh = {
+- .msg_iov = &iov,
+- .msg_iovlen = 1,
+- .msg_control = &control,
+- .msg_controllen = sizeof(control)
+- };
+-
+- assert(sendmsg(1, &mh, 0) == sizeof(iov));
+- assert(close(1) == 0);
+-
+- int status;
+- assert(waitpid(pid, &status, 0) == pid);
+- assert(status == 0);
+- } else {
+- assert(close(sv[1]) == 0);
+- assert(dup2(sv[0], 0) == 0);
+- assert(close(sv[0]) == 0);
+-
+- struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)];
+-
+- struct msghdr mh = {
+- .msg_iov = &iov,
+- .msg_iovlen = 1,
+- .msg_control = control,
+- .msg_controllen = sizeof(control)
+- };
+-
+- assert(recvmsg(0, &mh, 0) == sizeof(iov));
+- assert(close(0) == 0);
++ assert((fds[0] = open("/dev/null", O_RDWR)) == 4);
++ for (i = 1; i < ac; ++i)
++ assert((fds[i] = open(av[i], O_RDONLY)) == i + 4);
++
++ unsigned int cmsg_size = CMSG_SPACE(sizeof(fds));
++ struct cmsghdr *cmsg = tail_alloc(cmsg_size);
++ memset(cmsg, 0, cmsg_size);
++ cmsg->cmsg_level = SOL_SOCKET;
++ cmsg->cmsg_type = SCM_RIGHTS;
++ cmsg->cmsg_len = CMSG_LEN(sizeof(fds));
++ memcpy(CMSG_DATA(cmsg), fds, sizeof(fds));
++
++ mh->msg_control = cmsg;
++ mh->msg_controllen = cmsg_size;
++
++ assert(sendmsg(sv[1], mh, 0) == (int) data_size);
++
++ assert(close(sv[1]) == 0);
++ assert(open("/dev/null", O_RDWR) == sv[1]);
++
++ for (i = 0; i < ac; ++i) {
++ assert(close(fds[i]) == 0);
++ fds[i] = 0;
+ }
+
++ cmsg_size += CMSG_SPACE(sizeof(struct ucred));
++ cmsg = tail_alloc(cmsg_size);
++ memset(cmsg, 0, cmsg_size);
++ mh->msg_control = cmsg;
++ mh->msg_controllen = cmsg_size;
++
++ assert(recvmsg(0, mh, 0) == (int) data_size);
++ assert(close(0) == 0);
++
+ return 0;
+ }
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
new file mode 100644
index 000000000..1575ecd22
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
@@ -0,0 +1,306 @@
+From 87e6b230fff800eb768b68b2e5173ebbe83fd3ef Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Sat, 2 Jan 2016 12:05:14 +0000
+Subject: [PATCH] tests: introduce libtests
+
+Introduce tests/libtests.a with common functions for use in tests.
+
+* tests/tests.h: New file.
+* tests/error_msg.c: Likewise.
+* tests/tail_alloc.c: Likewise.
+* tests/get_page_size.c: Likewise.
+* tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS,
+check_LIBRARIES, LDADD): New variables.
+(clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD,
+pc_LDADD, times_LDADD): Add $(LDADD).
+* tests/.gitignore: Add libtests.a.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/.gitignore | 1 +
+ tests/Makefile.am | 20 ++++++++++----
+ tests/error_msg.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/get_page_size.c | 13 +++++++++
+ tests/tail_alloc.c | 52 ++++++++++++++++++++++++++++++++++++
+ tests/tests.h | 62 ++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 217 insertions(+), 5 deletions(-)
+ create mode 100644 tests/error_msg.c
+ create mode 100644 tests/get_page_size.c
+ create mode 100644 tests/tail_alloc.c
+ create mode 100644 tests/tests.h
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 386a2c2..62d0e56 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -40,6 +40,16 @@ AM_CPPFLAGS = $(ARCH_MFLAGS) \
+ -I$(top_srcdir)
+ AM_LDFLAGS = $(ARCH_MFLAGS)
+
++libtests_a_SOURCES = \
++ get_page_size.c \
++ error_msg.c \
++ tail_alloc.c \
++ tests.h \
++ # end of libtests_a_SOURCES
++libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
++check_LIBRARIES = libtests.a
++LDADD = libtests.a
++
+ check_PROGRAMS = \
+ _newselect \
+ adjtimex \
+@@ -146,19 +156,19 @@ check_PROGRAMS = \
+ xettimeofday \
+ # end of check_PROGRAMS
+
+-clock_xettime_LDADD = -lrt
+-filter_unavailable_LDADD = -lpthread
++clock_xettime_LDADD = -lrt $(LDADD)
++filter_unavailable_LDADD = -lpthread $(LDADD)
+ fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-mq_LDADD = -lrt
++mq_LDADD = -lrt $(LDADD)
+ newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-pc_LDADD = $(dl_LIBS)
++pc_LDADD = $(dl_LIBS) $(LDADD)
+ stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-times_LDADD = -lrt
++times_LDADD = -lrt $(LDADD)
+ truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ stack_fcall_SOURCES = stack-fcall.c \
+diff --git a/tests/error_msg.c b/tests/error_msg.c
+new file mode 100644
+index 0000000..3fd3411
+--- /dev/null
++++ b/tests/error_msg.c
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include "tests.h"
++#include <errno.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++void
++perror_msg_and_fail(const char *fmt, ...)
++{
++ int err_no = errno;
++ va_list p;
++
++ va_start(p, fmt);
++ vfprintf(stderr, fmt, p);
++ if (err_no)
++ fprintf(stderr, ": %s\n", strerror(err_no));
++ else
++ putc('\n', stderr);
++ exit(1);
++}
++
++void
++error_msg_and_skip(const char *fmt, ...)
++{
++ va_list p;
++
++ va_start(p, fmt);
++ vfprintf(stderr, fmt, p);
++ putc('\n', stderr);
++ exit(77);
++}
++
++void
++perror_msg_and_skip(const char *fmt, ...)
++{
++ int err_no = errno;
++ va_list p;
++
++ va_start(p, fmt);
++ vfprintf(stderr, fmt, p);
++ if (err_no)
++ fprintf(stderr, ": %s\n", strerror(err_no));
++ else
++ putc('\n', stderr);
++ exit(77);
++}
+diff --git a/tests/get_page_size.c b/tests/get_page_size.c
+new file mode 100644
+index 0000000..aeea861
+--- /dev/null
++++ b/tests/get_page_size.c
+@@ -0,0 +1,13 @@
++#include "tests.h"
++#include <unistd.h>
++
++size_t
++get_page_size(void)
++{
++ static size_t page_size;
++
++ if (!page_size)
++ page_size = sysconf(_SC_PAGESIZE);
++
++ return page_size;
++}
+diff --git a/tests/tail_alloc.c b/tests/tail_alloc.c
+new file mode 100644
+index 0000000..2b8b14e
+--- /dev/null
++++ b/tests/tail_alloc.c
+@@ -0,0 +1,52 @@
++/*
++ * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include "tests.h"
++#include <string.h>
++#include <sys/mman.h>
++
++void *
++tail_alloc(const size_t size)
++{
++ const size_t page_size = get_page_size();
++ const size_t len = (size + page_size - 1) & -page_size;
++ const size_t alloc_size = len + 2 * page_size;
++
++ void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
++ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
++ if (MAP_FAILED == p)
++ perror_msg_and_fail("mmap(%zu)", alloc_size);
++
++ void *start_work = p + page_size;
++ void *tail_guard = start_work + len;
++
++ if (munmap(p, page_size) || munmap(tail_guard, page_size))
++ perror_msg_and_fail("munmap");
++
++ memset(start_work, 0xff, len);
++ return tail_guard - size;
++}
+diff --git a/tests/tests.h b/tests/tests.h
+new file mode 100644
+index 0000000..91fa24e
+--- /dev/null
++++ b/tests/tests.h
+@@ -0,0 +1,62 @@
++/*
++ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef TESTS_H_
++# define TESTS_H_
++
++# ifdef HAVE_CONFIG_H
++# include "config.h"
++# endif
++
++# include <sys/types.h>
++# include "gcc_compat.h"
++
++/* Cached sysconf(_SC_PAGESIZE). */
++size_t get_page_size(void);
++
++/* Print message and strerror(errno) to stderr, then exit(1). */
++void perror_msg_and_fail(const char *, ...)
++ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++/* Print message to stderr, then exit(77). */
++void error_msg_and_skip(const char *, ...)
++ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++/* Print message and strerror(errno) to stderr, then exit(77). */
++void perror_msg_and_skip(const char *, ...)
++ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++
++/*
++ * Allocate memory that ends on the page boundary.
++ * Pages allocated by this call are preceeded by an unmapped page
++ * and followed also by an unmapped page.
++ */
++void *tail_alloc(const size_t)
++ ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1));
++
++# define SKIP_MAIN_UNDEFINED(arg) \
++ int main(void) { error_msg_and_skip("undefined: %s", arg); }
++
++#endif
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
new file mode 100644
index 000000000..3fbab8b66
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
@@ -0,0 +1,54 @@
+From 339a15b619b479c63cafba21d5fc359e613d9ee8 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Mon, 4 Jan 2016 23:53:31 +0000
+Subject: [PATCH] tests/scm_rights.c: use libtests
+
+* tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/scm_rights.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/tests/scm_rights.c b/tests/scm_rights.c
+index c41444f..1e5e850 100644
+--- a/tests/scm_rights.c
++++ b/tests/scm_rights.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
++ * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -25,6 +25,7 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#include "tests.h"
+ #include <assert.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -48,12 +49,15 @@ int main(int ac, const char **av)
+ (void) close(3);
+
+ int sv[2];
+- assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
++ perror_msg_and_skip("socketpair");
+ int one = 1;
+- assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0);
++ if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
++ perror_msg_and_skip("setsockopt");
+
+ pid_t pid = fork();
+- assert(pid >= 0);
++ if (pid < 0)
++ perror_msg_and_fail("fork");
+
+ if (pid) {
+ assert(close(sv[0]) == 0);
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch
deleted file mode 100644
index d9346a8b7..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Backport
-
- http://sourceforge.net/p/strace/code/ci/3460dc486d333231998de0f19918204aacee9ae3
-
-Expected to be released officially as part of strace 4.11
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 3460dc486d333231998de0f19918204aacee9ae3 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Sat, 28 Mar 2015 18:40:13 +0100
-Subject: [PATCH] Include <linux/ioctl.h> for _IOC_* macros
-
-Fix a compilation failure with musl libc.
-
-* evdev.c: Include <linux/ioctl.h>.
-* ioctl.c: Include <linux/ioctl.h> instead of <asm/ioctl.h>.
-* ioctlsort.c: Likewise.
-
-Reported-by: Dima Krasner <dima@dimakrasner.com>
-Acked-by: Mike Frysinger <vapier@gentoo.org>
----
- evdev.c | 2 ++
- ioctl.c | 2 +-
- ioctlsort.c | 2 +-
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/evdev.c b/evdev.c
-index 9a7430d..e06f9c1 100644
---- a/evdev.c
-+++ b/evdev.c
-@@ -28,6 +28,8 @@
-
- #include "defs.h"
-
-+#include <linux/ioctl.h>
-+
- #ifdef HAVE_LINUX_INPUT_H
- #include <linux/input.h>
- #include "xlat/evdev_abs.h"
-diff --git a/ioctl.c b/ioctl.c
-index 46f8334..c67d048 100644
---- a/ioctl.c
-+++ b/ioctl.c
-@@ -29,7 +29,7 @@
- */
-
- #include "defs.h"
--#include <asm/ioctl.h>
-+#include <linux/ioctl.h>
- #include "xlat/ioctl_dirs.h"
-
- #ifdef HAVE_LINUX_INPUT_H
-diff --git a/ioctlsort.c b/ioctlsort.c
-index 333556c..9c31691 100644
---- a/ioctlsort.c
-+++ b/ioctlsort.c
-@@ -33,7 +33,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <asm/ioctl.h>
-+#include <linux/ioctl.h>
-
- struct ioctlent {
- const char *info;
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch
deleted file mode 100644
index 0b072fe53..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Backport
-
- http://sourceforge.net/p/strace/code/ci/d34e00b293942b1012ddc49ed3ab379a32337611
-
-Expected to be released officially as part of strace 4.11
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From d34e00b293942b1012ddc49ed3ab379a32337611 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Sat, 28 Mar 2015 18:21:09 +0100
-Subject: [PATCH] Include <sys/stat.h> for S_I* macros
-
-Fix a compilation failure with musl libc.
-
-* mknod.c: Include <sys/stat.h>.
-* printmode.c: Likewise.
-
-Reported-by: Dima Krasner <dima@dimakrasner.com>
-Acked-by: Mike Frysinger <vapier@gentoo.org>
----
- mknod.c | 1 +
- printmode.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/mknod.c b/mknod.c
-index 07e9a45..1463232 100644
---- a/mknod.c
-+++ b/mknod.c
-@@ -1,6 +1,7 @@
- #include "defs.h"
-
- #include <fcntl.h>
-+#include <sys/stat.h>
-
- #ifdef MAJOR_IN_SYSMACROS
- # include <sys/sysmacros.h>
-diff --git a/printmode.c b/printmode.c
-index 4df1b9f..a721936 100644
---- a/printmode.c
-+++ b/printmode.c
-@@ -1,6 +1,7 @@
- #include "defs.h"
-
- #include <fcntl.h>
-+#include <sys/stat.h>
-
- #include "xlat/modetypes.h"
-
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index f3603012f..824031e86 100644
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -10,32 +10,32 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index e73958c..5f0dfee 100644
+index 0209bac..b969e25 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -6,7 +6,7 @@ AC_INIT([strace],
+@@ -36,7 +36,7 @@ AC_INIT([strace],
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules serial-tests])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index ff5e136..984bdb6 100644
+index 0f23b4b..429f7e9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -101,3 +101,21 @@ EXTRA_DIST = init.sh run.sh \
- $(TESTS)
+@@ -332,3 +332,21 @@ ksysent.h: $(srcdir)/ksysent.sed
- CLEANFILES = $(TESTS:=.tmp)
+ BUILT_SOURCES = ksysent.h
+ CLEANFILES = ksysent.h $(TESTS:=.tmp)
+
+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
+
+install-ptest:
+ install $(BUILDDIR)/strace $(DESTDIR)
-+ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
++ install $(srcdir)/../strace-log-merge $(DESTDIR)
+ install -d $(DESTDIR)/$(TESTDIR)
+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch b/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
new file mode 100644
index 000000000..7bc143635
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
@@ -0,0 +1,20 @@
+The git-version-gen script is not included in tarball releases,
+so we need to avoid attempts to call it when running autoreconf.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: strace-4.10/configure.ac
+===================================================================
+--- strace-4.10.orig/configure.ac
++++ strace-4.10/configure.ac
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to create configure. Use autoreconf.
+ AC_PREREQ(2.57)
+ AC_INIT([strace],
+- m4_esyscmd([./git-version-gen .tarball-version]),
++ m4_esyscmd_s([cat .tarball-version]),
+ [strace-devel@lists.sourceforge.net])
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen b/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen
deleted file mode 100755
index 8fee74e12..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/bin/sh
-# Print a version string.
-scriptversion=2012-12-31.23; # UTC
-
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
-# It may be run two ways:
-# - from a git repository in which the "git describe" command below
-# produces useful output (thus requiring at least one signed tag)
-# - from a non-git-repo directory containing a .tarball-version file, which
-# presumes this script is invoked like "./git-version-gen .tarball-version".
-
-# In order to use intra-version strings in your project, you will need two
-# separate generated version string files:
-#
-# .tarball-version - present only in a distribution tarball, and not in
-# a checked-out repository. Created with contents that were learned at
-# the last time autoconf was run, and used by git-version-gen. Must not
-# be present in either $(srcdir) or $(builddir) for git-version-gen to
-# give accurate answers during normal development with a checked out tree,
-# but must be present in a tarball when there is no version control system.
-# Therefore, it cannot be used in any dependencies. GNUmakefile has
-# hooks to force a reconfigure at distribution time to get the value
-# correct, without penalizing normal development with extra reconfigures.
-#
-# .version - present in a checked-out repository and in a distribution
-# tarball. Usable in dependencies, particularly for files that don't
-# want to depend on config.h but do want to track version changes.
-# Delete this file prior to any autoconf run where you want to rebuild
-# files to pick up a version string change; and leave it stale to
-# minimize rebuild time after unrelated changes to configure sources.
-#
-# As with any generated file in a VC'd directory, you should add
-# /.version to .gitignore, so that you don't accidentally commit it.
-# .tarball-version is never generated in a VC'd directory, so needn't
-# be listed there.
-#
-# Use the following line in your configure.ac, so that $(VERSION) will
-# automatically be up-to-date each time configure is run (and note that
-# since configure.ac no longer includes a version string, Makefile rules
-# should not depend on configure.ac for version updates).
-#
-# AC_INIT([GNU project],
-# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
-# [bug-project@example])
-#
-# Then use the following lines in your Makefile.am, so that .version
-# will be present for dependencies, and so that .version and
-# .tarball-version will exist in distribution tarballs.
-#
-# EXTRA_DIST = $(top_srcdir)/.version
-# BUILT_SOURCES = $(top_srcdir)/.version
-# $(top_srcdir)/.version:
-# echo $(VERSION) > $@-t && mv $@-t $@
-# dist-hook:
-# echo $(VERSION) > $(distdir)/.tarball-version
-
-
-me=$0
-
-version="git-version-gen $scriptversion
-
-Copyright 2011 Free Software Foundation, Inc.
-There is NO warranty. You may redistribute this software
-under the terms of the GNU General Public License.
-For more information about these matters, see the files named COPYING."
-
-usage="\
-Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
-Print a version string.
-
-Options:
-
- --prefix prefix of git tags (default 'v')
- --fallback fallback version to use if \"git --version\" fails
-
- --help display this help and exit
- --version output version information and exit
-
-Running without arguments will suffice in most cases."
-
-prefix=v
-fallback=
-
-while test $# -gt 0; do
- case $1 in
- --help) echo "$usage"; exit 0;;
- --version) echo "$version"; exit 0;;
- --prefix) shift; prefix="$1";;
- --fallback) shift; fallback="$1";;
- -*)
- echo "$0: Unknown option '$1'." >&2
- echo "$0: Try '--help' for more information." >&2
- exit 1;;
- *)
- if test "x$tarball_version_file" = x; then
- tarball_version_file="$1"
- elif test "x$tag_sed_script" = x; then
- tag_sed_script="$1"
- else
- echo "$0: extra non-option argument '$1'." >&2
- exit 1
- fi;;
- esac
- shift
-done
-
-if test "x$tarball_version_file" = x; then
- echo "$usage"
- exit 1
-fi
-
-tag_sed_script="${tag_sed_script:-s/x/x/}"
-
-nl='
-'
-
-# Avoid meddling by environment variable of the same name.
-v=
-v_from_git=
-
-# First see if there is a tarball-only version file.
-# then try "git describe", then default.
-if test -f $tarball_version_file
-then
- v=`cat $tarball_version_file` || v=
- case $v in
- *$nl*) v= ;; # reject multi-line output
- [0-9]*) ;;
- *) v= ;;
- esac
- test "x$v" = x \
- && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
-fi
-
-if test "x$v" != x
-then
- : # use $v
-# Otherwise, if there is at least one git commit involving the working
-# directory, and "git describe" output looks sensible, use that to
-# derive a version string.
-elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
- && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
- || git describe --abbrev=4 HEAD 2>/dev/null` \
- && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
- && case $v in
- $prefix[0-9]*) ;;
- *) (exit 1) ;;
- esac
-then
- # Is this a new git that lists number of commits since the last
- # tag or the previous older version that did not?
- # Newer: v6.10-77-g0f8faeb
- # Older: v6.10-g0f8faeb
- case $v in
- *-*-*) : git describe is okay three part flavor ;;
- *-*)
- : git describe is older two part flavor
- # Recreate the number of commits and rewrite such that the
- # result is the same as if we were using the newer version
- # of git describe.
- vtag=`echo "$v" | sed 's/-.*//'`
- commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
- || { commit_list=failed;
- echo "$0: WARNING: git rev-list failed" 1>&2; }
- numcommits=`echo "$commit_list" | wc -l`
- v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
- test "$commit_list" = failed && v=UNKNOWN
- ;;
- esac
-
- # Change the first '-' to a '.', so version-comparing tools work properly.
- # Remove the "g" in git describe's output string, to save a byte.
- v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`;
- v_from_git=1
-elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
- v=UNKNOWN
-else
- v=$fallback
-fi
-
-v=`echo "$v" |sed "s/^$prefix//"`
-
-# Test whether to append the "-dirty" suffix only if the version
-# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
-# or if it came from .tarball-version.
-if test "x$v_from_git" != x; then
- # Don't declare a version "dirty" merely because a time stamp has changed.
- git update-index --refresh > /dev/null 2>&1
-
- dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
- case "$dirty" in
- '') ;;
- *) # Append the suffix only if there isn't one already.
- case $v in
- *-dirty) ;;
- *) v="$v-dirty" ;;
- esac ;;
- esac
-fi
-
-# Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d "$nl"
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch b/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
new file mode 100644
index 000000000..756cd8bb8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
@@ -0,0 +1,46 @@
+From 154af50ed7ed8b91838d713052ebf29b0b14f765 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Mon, 18 Jan 2016 11:00:00 -0800
+Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support
+
+When using the default OE toolchain for x86-64, the basic checks for
+-m32 and -mx32 compile support in mpers.m4 pass but later attempts to
+actually use the toolchain with -m32 fail, e.g.
+
+ | In file included from /home/andre/build/tmp/sysroots/qemux86-64/usr/include/sys/syscall.h:31:0,
+ | from ../strace-4.11/defs.h:55,
+ | from mpers-m32/kernel_dirent.c:32:
+ | /home/andre/build/tmp/sysroots/qemux86-64/usr/include/bits/syscall.h:41:29: fatal error: bits/syscall-32.h: No such file or directory
+
+Make the mpers.m4 tests more robust so that configure correctly
+detects the limitations of the OE toolchain.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ m4/mpers.m4 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/m4/mpers.m4 b/m4/mpers.m4
+index 1fe8a8e..d72c717 100644
+--- a/m4/mpers.m4
++++ b/m4/mpers.m4
+@@ -53,12 +53,14 @@ case "$arch" in
+ CFLAGS="$CFLAGS CFLAG $IFLAG"
+ AC_CACHE_CHECK([for CFLAG compile support], [st_cv_cc],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
++ #include <sys/syscall.h>
+ int main(){return 0;}]])],
+ [st_cv_cc=yes],
+ [st_cv_cc=no])])
+ if test $st_cv_cc = yes; then
+ AC_CACHE_CHECK([for CFLAG runtime support], [st_cv_runtime],
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
++ #include <sys/syscall.h>
+ int main(){return 0;}]])],
+ [st_cv_runtime=yes],
+ [st_cv_runtime=no],
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch b/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch
deleted file mode 100644
index e48e4b31b..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Add options "aio" and "acl" to enable/disable libaio and acl support.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- configure.ac | 26 ++++++++++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index e73958c..9099370 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -270,6 +270,18 @@ AC_CHECK_HEADERS(m4_normalize([
- sys/vfs.h
- sys/xattr.h
- ]))
-+
-+AC_ARG_ENABLE([acl],
-+ [AS_HELP_STRING([--enable-acl], [turn on acl support])],
-+ [case $enableval in
-+ yes)
-+ AC_CHECK_HEADERS([sys/acl.h])
-+ ;;
-+ no) ;;
-+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
-+ esac]
-+)
-+
- AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
- [], [], [#include <stddef.h>
- #include <sys/socket.h>
-@@ -745,6 +757,20 @@ if test "x$ac_cv_lib_dl_dladdr" = xyes; then
- fi
- AC_SUBST(dl_LIBS)
-
-+AC_ARG_ENABLE([aio],
-+ [AS_HELP_STRING([--enable-aio], [turn on libaio support])],
-+ [case $enableval in
-+ yes)
-+ AC_CHECK_HEADERS([libaio.h], [
-+ AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-+ AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
-+ ])
-+ ;;
-+ no) ;;
-+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
-+ esac]
-+)
-+
- AC_PATH_PROG([PERL], [perl])
-
- dnl stack trace with libunwind
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
new file mode 100644
index 000000000..bfc7f3441
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -0,0 +1,118 @@
+From 3836518c46bd5bb3e71371b1b18274bf2d487133 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Mon, 18 Jan 2016 11:01:00 -0800
+Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk
+
+The default path to gawk is /usr/bin/gawk, so update test scripts etc
+from #!/bin/gawk to #!/usr/bin/gawk. Fixes missing RDPENDS QA tests:
+
+ WARNING: QA Issue: /usr/lib/strace/ptest/tests/unix-yy-accept.awk_strace-ptest contained in package strace-ptest requires /bin/gawk, but no providers found in its RDEPENDS [file-rdeps]
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ mpers.awk | 2 +-
+ tests/caps.awk | 2 +-
+ tests/match.awk | 2 +-
+ tests/net-yy-accept.awk | 2 +-
+ tests/net-yy-connect.awk | 2 +-
+ tests/sigaction.awk | 2 +-
+ tests/uid.awk | 2 +-
+ tests/unix-yy-accept.awk | 2 +-
+ tests/unix-yy-connect.awk | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/mpers.awk b/mpers.awk
+index 73bf0b0..50e6c16 100644
+--- a/mpers.awk
++++ b/mpers.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
+ # Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/caps.awk b/tests/caps.awk
+index bad8b0f..845f37c 100644
+--- a/tests/caps.awk
++++ b/tests/caps.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/match.awk b/tests/match.awk
+index abfbae9..f2740bf 100644
+--- a/tests/match.awk
++++ b/tests/match.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/net-yy-accept.awk b/tests/net-yy-accept.awk
+index fed3e30..e916ab0 100644
+--- a/tests/net-yy-accept.awk
++++ b/tests/net-yy-accept.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/net-yy-connect.awk b/tests/net-yy-connect.awk
+index f4dcf91..b3cec8c 100644
+--- a/tests/net-yy-connect.awk
++++ b/tests/net-yy-connect.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/sigaction.awk b/tests/sigaction.awk
+index 5c6b6d0..3e14464 100644
+--- a/tests/sigaction.awk
++++ b/tests/sigaction.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/uid.awk b/tests/uid.awk
+index a56c5be..67b0749 100644
+--- a/tests/uid.awk
++++ b/tests/uid.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/unix-yy-accept.awk b/tests/unix-yy-accept.awk
+index 4ed60e4..2a9d9c0 100644
+--- a/tests/unix-yy-accept.awk
++++ b/tests/unix-yy-accept.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/unix-yy-connect.awk b/tests/unix-yy-connect.awk
+index 262bf2e..c809dfa 100644
+--- a/tests/unix-yy-connect.awk
++++ b/tests/unix-yy-connect.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
new file mode 100644
index 000000000..db83d1130
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
@@ -0,0 +1,51 @@
+From 2995245d7e3f46e8b3995002995ebd28beca7d55 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 5 Feb 2016 14:00:00 -0800
+Subject: [PATCH] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc.
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1524b9b..287e03d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -196,20 +196,20 @@ AC_SUBST(arch_mx32)
+ if test "$arch" = mips; then
+ AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
+ [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
+- [#include <sgidefs.h>],
++ [#include <asm/sgidefs.h>],
+ [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
+
+ AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
+ [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])],
+ [st_cv_mips_abi=o32],
+ [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])],
+ [st_cv_mips_abi=n32],
+ [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++ [AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])],
+ [st_cv_mips_abi=n64],
+ [st_cv_mips_abi=unknown])])])])
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb b/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb
deleted file mode 100644
index 20b7e3d0a..000000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
- file://0001-Add-linux-aarch64-arch_regs.h.patch \
- file://git-version-gen \
- file://strace-add-configure-options.patch \
- file://Makefile-ptest.patch \
- file://run-ptest \
- file://Include-sys-stat.h-for-S_I-macros.patch \
- file://Include-linux-ioctl.h-for-_IOC_-macros.patch \
- "
-
-SRC_URI[md5sum] = "107a5be455493861189e9b57a3a51912"
-SRC_URI[sha256sum] = "e6180d866ef9e76586b96e2ece2bfeeb3aa23f5cc88153f76e9caedd65e40ee2"
-
-inherit autotools ptest bluetooth
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
-
-PACKAGECONFIG_class-target ??= "\
- libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
-PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind"
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-
-TESTDIR = "tests"
-
-do_configure_prepend() {
- cp ${WORKDIR}/git-version-gen ${S}
-}
-
-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 OS=linux ARCH="${TARGET_ARCH}"
-}
-
-do_install_ptest() {
- oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb b/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
new file mode 100644
index 000000000..739138802
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
@@ -0,0 +1,51 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
+
+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://use-asm-sgidefs.h.patch \
+ file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \
+ file://Makefile-ptest.patch \
+ file://0001-tests-scm_rights.c-use-libtests.patch \
+ file://0001-scm_rights-fd.test-rewrite-without-fork.patch \
+ file://0001-Move-gcc-compat-macros-to-gcc_compat.h.patch \
+ file://0001-tests-introduce-libtests.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "a15d2555a7febb56d00c6e1a51c655dc"
+SRC_URI[sha256sum] = "e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5cd8152"
+
+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"
OpenPOWER on IntegriCloud