diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-07-11 11:13:37 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-17 10:54:01 +0100 |
commit | 804cebc8b9329523c31bb864d7049f8dc5279a5c (patch) | |
tree | 77257f1bcc644b7797f1fd849393bb4bfbae07a6 | |
parent | 19bf330db74496c4d5448dece4dd867265394e28 (diff) | |
download | poky-804cebc8b9329523c31bb864d7049f8dc5279a5c.tar.gz |
strace: Fix build on eglibc 2.16
This patch fixes two build issues seen with strace
one in general with eglibc 2.16 and another with x32 abi
(From OE-Core rev: 2ed0011adc1642e0fbb6bfe1d7ae6b70ce7dfedb)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch | 52 | ||||
-rw-r--r-- | meta/recipes-devtools/strace/strace-4.7/strace-x32.patch | 88 | ||||
-rw-r--r-- | meta/recipes-devtools/strace/strace_4.7.bb | 7 |
3 files changed, 145 insertions, 2 deletions
diff --git a/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch b/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch new file mode 100644 index 0000000000..67cf4e8c11 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.7/strace-eglibc-2.16.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | https://bugs.gentoo.org/414637 | ||
4 | |||
5 | From 302e8ec6cd62912a3cd6494ce6702f4ad8dae0e2 Mon Sep 17 00:00:00 2001 | ||
6 | From: Mike Frysinger <vapier@gentoo.org> | ||
7 | Date: Fri, 4 May 2012 19:30:59 -0400 | ||
8 | Subject: [PATCH] util: fix building when glibc has a stub process_vm_readv | ||
9 | |||
10 | If you have a newer glibc which provides process_vm_readv, but it is built | ||
11 | against older kernel headers which lack __NR_process_vm_readv, the library | ||
12 | will contain a stub implementation that just returns ENOSYS. Autoconf | ||
13 | checks for this case explicitly and will declare it as unavailable. So we | ||
14 | end up in a case where the headers provide the prototype, but autoconf has | ||
15 | not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again: | ||
16 | |||
17 | util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration | ||
18 | /usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here | ||
19 | |||
20 | So rename our local function to something unique, and add a define so the | ||
21 | callers all hit the right place. | ||
22 | |||
23 | * util.c (strace_process_vm_readv): Rename from process_vm_readv. | ||
24 | (process_vm_readv): Define to strace_process_vm_readv. | ||
25 | |||
26 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
27 | --- | ||
28 | util.c | 4 +++- | ||
29 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
30 | |||
31 | Index: strace-4.7/util.c | ||
32 | =================================================================== | ||
33 | --- strace-4.7.orig/util.c 2012-04-28 05:58:35.000000000 -0700 | ||
34 | +++ strace-4.7/util.c 2012-07-11 11:07:47.869825001 -0700 | ||
35 | @@ -735,7 +735,8 @@ | ||
36 | |||
37 | #if defined(__NR_process_vm_readv) | ||
38 | static bool process_vm_readv_not_supported = 0; | ||
39 | -static ssize_t process_vm_readv(pid_t pid, | ||
40 | +/* Have to avoid duplicating with the C library headers. */ | ||
41 | +static ssize_t strace_process_vm_readv(pid_t pid, | ||
42 | const struct iovec *lvec, | ||
43 | unsigned long liovcnt, | ||
44 | const struct iovec *rvec, | ||
45 | @@ -744,6 +745,7 @@ | ||
46 | { | ||
47 | return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags); | ||
48 | } | ||
49 | +#define process_vm_readv strace_process_vm_readv | ||
50 | #else | ||
51 | static bool process_vm_readv_not_supported = 1; | ||
52 | # define process_vm_readv(...) (errno = ENOSYS, -1) | ||
diff --git a/meta/recipes-devtools/strace/strace-4.7/strace-x32.patch b/meta/recipes-devtools/strace/strace-4.7/strace-x32.patch new file mode 100644 index 0000000000..3dc69b282b --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.7/strace-x32.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | m 364ed4f14c5edb5ddbc79c72d22498219033b29d Mon Sep 17 00:00:00 2001 | ||
4 | From: Mike Frysinger <vapier@gentoo.org> | ||
5 | Date: Mon, 4 Jun 2012 13:19:42 -0400 | ||
6 | Subject: [PATCH] x32: update syscall table | ||
7 | |||
8 | This syncs with the syscall table as it is in linux 3.4. | ||
9 | |||
10 | * linux/x32/syscallent.h (59): Fix comment typo. | ||
11 | (78): Add missing getdents entry. | ||
12 | (174): Delete create_module entry (not in the kernel). | ||
13 | (181, 182, 183, 184, 185): Add missing entries. | ||
14 | (524, 536, 539, 540): Fix spacing. | ||
15 | |||
16 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
17 | --- | ||
18 | linux/x32/syscallent.h | 24 ++++++++++++------------ | ||
19 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
20 | |||
21 | Index: strace-4.7/linux/x32/syscallent.h | ||
22 | =================================================================== | ||
23 | --- strace-4.7.orig/linux/x32/syscallent.h 2012-04-16 04:00:01.000000000 -0700 | ||
24 | +++ strace-4.7/linux/x32/syscallent.h 2012-07-11 11:08:00.285824906 -0700 | ||
25 | @@ -57,7 +57,7 @@ | ||
26 | { 5, TP, sys_clone, "clone" }, /* 56 */ | ||
27 | { 0, TP, sys_fork, "fork" }, /* 57 */ | ||
28 | { 0, TP, sys_vfork, "vfork" }, /* 58 */ | ||
29 | - { }, /* 47 */ | ||
30 | + { }, /* 59 */ | ||
31 | { 1, TP, sys_exit, "_exit" }, /* 60 */ | ||
32 | { 4, TP, sys_wait4, "wait4" }, /* 61 */ | ||
33 | { 2, TS, sys_kill, "kill" }, /* 62 */ | ||
34 | @@ -76,7 +76,7 @@ | ||
35 | { 1, TD, sys_fdatasync, "fdatasync" }, /* 75 */ | ||
36 | { 2, TF, sys_truncate, "truncate" }, /* 76 */ | ||
37 | { 2, TD, sys_ftruncate, "ftruncate" }, /* 77 */ | ||
38 | - { }, /* 78 */ | ||
39 | + { 3, TD, sys_getdents, "getdents" }, /* 78 */ | ||
40 | { 2, TF, sys_getcwd, "getcwd" }, /* 79 */ | ||
41 | { 1, TF, sys_chdir, "chdir" }, /* 80 */ | ||
42 | { 1, TD, sys_fchdir, "fchdir" }, /* 81 */ | ||
43 | @@ -172,18 +172,18 @@ | ||
44 | { 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */ | ||
45 | { 1, 0, sys_iopl, "iopl" }, /* 172 */ | ||
46 | { 3, 0, sys_ioperm, "ioperm" }, /* 173 */ | ||
47 | - { 2, 0, sys_create_module, "create_module" }, /* 174 */ | ||
48 | + { }, /* 174 */ | ||
49 | { 3, 0, sys_init_module, "init_module" }, /* 175 */ | ||
50 | { 2, 0, sys_delete_module, "delete_module" }, /* 176 */ | ||
51 | { }, /* 177 */ | ||
52 | { }, /* 178 */ | ||
53 | { 4, 0, sys_quotactl, "quotactl" }, /* 179 */ | ||
54 | { }, /* 180 */ | ||
55 | - { }, /* 181 */ | ||
56 | - { }, /* 182 */ | ||
57 | - { }, /* 183 */ | ||
58 | - { }, /* 184 */ | ||
59 | - { }, /* 185 */ | ||
60 | + { 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */ | ||
61 | + { 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */ | ||
62 | + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */ | ||
63 | + { 3, 0, sys_tuxcall, "tuxcall" }, /* 184 */ | ||
64 | + { 3, 0, sys_security, "security" }, /* 185 */ | ||
65 | { 0, 0, sys_gettid, "gettid" }, /* 186 */ | ||
66 | { 4, TD, sys_readahead, "readahead" }, /* 187 */ | ||
67 | { 5, TF, sys_setxattr, "setxattr" }, /* 188 */ | ||
68 | @@ -325,7 +325,7 @@ | ||
69 | { 4, 0, sys_ptrace, "ptrace" }, /* 521 */ | ||
70 | { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 522 */ | ||
71 | { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 523 */ | ||
72 | - { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */ | ||
73 | + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */ | ||
74 | { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 525 */ | ||
75 | { 3, 0, sys_timer_create, "timer_create" }, /* 526 */ | ||
76 | { 2, 0, sys_mq_notify, "mq_notify" }, /* 527 */ | ||
77 | @@ -337,8 +337,8 @@ | ||
78 | { 6, 0, sys_move_pages, "move_pages" }, /* 533 */ | ||
79 | { 5, TD, sys_preadv, "preadv" }, /* 534 */ | ||
80 | { 5, TD, sys_pwritev, "pwritev" }, /* 535 */ | ||
81 | - { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 536 */ | ||
82 | + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 536 */ | ||
83 | { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 537 */ | ||
84 | { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 538 */ | ||
85 | - { 6, 0, sys_process_vm_readv, "process_vm_readv"}, /* 539 */ | ||
86 | - { 6, 0, sys_process_vm_writev, "process_vm_writev"}, /* 540 */ | ||
87 | + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 539 */ | ||
88 | + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 540 */ | ||
diff --git a/meta/recipes-devtools/strace/strace_4.7.bb b/meta/recipes-devtools/strace/strace_4.7.bb index e7ab0cb0bd..21dd47a811 100644 --- a/meta/recipes-devtools/strace/strace_4.7.bb +++ b/meta/recipes-devtools/strace/strace_4.7.bb | |||
@@ -3,13 +3,16 @@ HOMEPAGE = "http://strace.sourceforge.net" | |||
3 | SECTION = "console/utils" | 3 | SECTION = "console/utils" |
4 | LICENSE = "BSD" | 4 | LICENSE = "BSD" |
5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=124500c21e856f0912df29295ba104c7" | 5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=124500c21e856f0912df29295ba104c7" |
6 | PR = "r0" | 6 | PR = "r1" |
7 | 7 | ||
8 | PACKAGES =+ "${PN}-graph " | 8 | PACKAGES =+ "${PN}-graph " |
9 | FILES_${PN}-graph = "${bindir}/strace-graph" | 9 | FILES_${PN}-graph = "${bindir}/strace-graph" |
10 | RDEPENDS_${PN}-graph = "perl" | 10 | RDEPENDS_${PN}-graph = "perl" |
11 | 11 | ||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz" | 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ |
13 | file://strace-eglibc-2.16.patch \ | ||
14 | file://strace-x32.patch \ | ||
15 | " | ||
13 | 16 | ||
14 | SRC_URI[md5sum] = "6054c3880a00c6703f83b57f15e04642" | 17 | SRC_URI[md5sum] = "6054c3880a00c6703f83b57f15e04642" |
15 | SRC_URI[sha256sum] = "c49cd98873c119c5f201356200a9b9687da1ceea83a05047e2ae0a7ac1e41195" | 18 | SRC_URI[sha256sum] = "c49cd98873c119c5f201356200a9b9687da1ceea83a05047e2ae0a7ac1e41195" |