diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-devtools/strace | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-devtools/strace')
7 files changed, 518 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch b/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch new file mode 100644 index 0000000000..5a0090eb6d --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 0b4060f61f1bb101b5d8d084714b7d2feacdb199 Mon Sep 17 00:00:00 2001 | ||
4 | From: Ali Polatel <alip@exherbo.org> | ||
5 | Date: Tue, 24 Sep 2013 20:04:32 +0300 | ||
6 | Subject: [PATCH] Work around conflict between <sys/ptrace.h> and | ||
7 | <linux/ptrace.h> | ||
8 | |||
9 | Since glibc-2.18~39 <sys/ptrace.h> defines ptrace_peeksiginfo_args | ||
10 | which collides with <linux/ptrace.h>. | ||
11 | |||
12 | * configure.ac: Check for `struct ptrace_peeksiginfo_args' in | ||
13 | <sys/ptrace.h>. | ||
14 | * process.c: Work around potential conflict between <sys/ptrace.h> | ||
15 | and <linux/ptrace.h> by redefining ptrace_peeksiginfo_args. | ||
16 | * signal.c: Likewise. | ||
17 | * syscall.c: Likewise. | ||
18 | * util.c: Likewise. | ||
19 | |||
20 | Signed-off-by: Ali Polatel <alip@exherbo.org> | ||
21 | --- | ||
22 | configure.ac | 2 +- | ||
23 | process.c | 4 ++++ | ||
24 | signal.c | 4 ++++ | ||
25 | syscall.c | 4 ++++ | ||
26 | util.c | 4 ++++ | ||
27 | 5 files changed, 17 insertions(+), 1 deletion(-) | ||
28 | |||
29 | diff --git a/configure.ac b/configure.ac | ||
30 | index f19e4f2..aa4923a 100644 | ||
31 | --- a/configure.ac | ||
32 | +++ b/configure.ac | ||
33 | @@ -257,7 +257,7 @@ AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr, | ||
34 | |||
35 | AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>]) | ||
36 | |||
37 | -AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg],,, | ||
38 | +AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,, | ||
39 | [#include <sys/ptrace.h>]) | ||
40 | |||
41 | AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>]) | ||
42 | diff --git a/process.c b/process.c | ||
43 | index 1a2181b..59428a4 100644 | ||
44 | --- a/process.c | ||
45 | +++ b/process.c | ||
46 | @@ -63,7 +63,11 @@ | ||
47 | # ifdef HAVE_STRUCT_PT_ALL_USER_REGS | ||
48 | # define pt_all_user_regs XXX_pt_all_user_regs | ||
49 | # endif | ||
50 | +# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS | ||
51 | +# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args | ||
52 | +# endif | ||
53 | # include <linux/ptrace.h> | ||
54 | +# undef ptrace_peeksiginfo_args | ||
55 | # undef ia64_fpreg | ||
56 | # undef pt_all_user_regs | ||
57 | #endif | ||
58 | diff --git a/signal.c b/signal.c | ||
59 | index 7fb9abf..3411ddd 100644 | ||
60 | --- a/signal.c | ||
61 | +++ b/signal.c | ||
62 | @@ -51,7 +51,11 @@ | ||
63 | # ifdef HAVE_STRUCT_PT_ALL_USER_REGS | ||
64 | # define pt_all_user_regs XXX_pt_all_user_regs | ||
65 | # endif | ||
66 | +# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS | ||
67 | +# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args | ||
68 | +# endif | ||
69 | # include <linux/ptrace.h> | ||
70 | +# undef ptrace_peeksiginfo_args | ||
71 | # undef ia64_fpreg | ||
72 | # undef pt_all_user_regs | ||
73 | #endif | ||
74 | diff --git a/syscall.c b/syscall.c | ||
75 | index 83a95bd..3477dcd 100644 | ||
76 | --- a/syscall.c | ||
77 | +++ b/syscall.c | ||
78 | @@ -48,7 +48,11 @@ | ||
79 | # ifdef HAVE_STRUCT_PT_ALL_USER_REGS | ||
80 | # define pt_all_user_regs XXX_pt_all_user_regs | ||
81 | # endif | ||
82 | +# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS | ||
83 | +# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args | ||
84 | +# endif | ||
85 | # include <linux/ptrace.h> | ||
86 | +# undef ptrace_peeksiginfo_args | ||
87 | # undef ia64_fpreg | ||
88 | # undef pt_all_user_regs | ||
89 | #endif | ||
90 | diff --git a/util.c b/util.c | ||
91 | index 0dab902..30a7f19 100644 | ||
92 | --- a/util.c | ||
93 | +++ b/util.c | ||
94 | @@ -55,7 +55,11 @@ | ||
95 | # ifdef HAVE_STRUCT_PT_ALL_USER_REGS | ||
96 | # define pt_all_user_regs XXX_pt_all_user_regs | ||
97 | # endif | ||
98 | +# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS | ||
99 | +# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args | ||
100 | +# endif | ||
101 | # include <linux/ptrace.h> | ||
102 | +# undef ptrace_peeksiginfo_args | ||
103 | # undef ia64_fpreg | ||
104 | # undef pt_all_user_regs | ||
105 | #endif | ||
106 | -- | ||
107 | 1.8.2.1 | ||
108 | |||
diff --git a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch new file mode 100644 index 0000000000..3a0eb39375 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | strace: Add ptest | ||
2 | |||
3 | Upstream-Status: Inappropriate | ||
4 | |||
5 | Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com> | ||
6 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
7 | |||
8 | --- old/tests/Makefile.am 2013-07-23 13:44:24.660481381 +0200 | ||
9 | +++ new/tests/Makefile.am 2013-07-23 16:22:42.937654391 +0200 | ||
10 | @@ -9,3 +9,21 @@ | ||
11 | EXTRA_DIST = init.sh $(TESTS) | ||
12 | |||
13 | CLEANFILES = check.log | ||
14 | + | ||
15 | +buildtest-TESTS: $(check_PROGRAMS) $(TESTS) | ||
16 | + | ||
17 | +install-ptest: | ||
18 | + install $(BUILDDIR)/strace $(DESTDIR) | ||
19 | + install "$(srcdir)/.."/strace-log-merge $(DESTDIR) | ||
20 | + install -d $(DESTDIR)/$(TESTDIR) | ||
21 | + cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR) | ||
22 | + sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile | ||
23 | + sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile | ||
24 | + for file in $(check_PROGRAMS); do \ | ||
25 | + install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \ | ||
26 | + done | ||
27 | + for file in $(EXTRA_DIST); do \ | ||
28 | + install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \ | ||
29 | + sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \ | ||
30 | + done | ||
31 | + sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net | ||
32 | --- a/configure.ac | ||
33 | +++ b/configure.ac | ||
34 | @@ -6,7 +6,7 @@ AC_INIT([strace], | ||
35 | AC_CONFIG_SRCDIR([strace.c]) | ||
36 | AC_CONFIG_AUX_DIR([.]) | ||
37 | AC_CONFIG_HEADERS([config.h]) | ||
38 | -AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules]) | ||
39 | +AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests]) | ||
40 | AM_MAINTAINER_MODE | ||
41 | AC_CANONICAL_HOST | ||
diff --git a/meta/recipes-devtools/strace/strace-4.8/git-version-gen b/meta/recipes-devtools/strace/strace-4.8/git-version-gen new file mode 100755 index 0000000000..8fee74e121 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/git-version-gen | |||
@@ -0,0 +1,225 @@ | |||
1 | #!/bin/sh | ||
2 | # Print a version string. | ||
3 | scriptversion=2012-12-31.23; # UTC | ||
4 | |||
5 | # Copyright (C) 2007-2013 Free Software Foundation, Inc. | ||
6 | # | ||
7 | # This program is free software: you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 3 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | |||
20 | # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. | ||
21 | # It may be run two ways: | ||
22 | # - from a git repository in which the "git describe" command below | ||
23 | # produces useful output (thus requiring at least one signed tag) | ||
24 | # - from a non-git-repo directory containing a .tarball-version file, which | ||
25 | # presumes this script is invoked like "./git-version-gen .tarball-version". | ||
26 | |||
27 | # In order to use intra-version strings in your project, you will need two | ||
28 | # separate generated version string files: | ||
29 | # | ||
30 | # .tarball-version - present only in a distribution tarball, and not in | ||
31 | # a checked-out repository. Created with contents that were learned at | ||
32 | # the last time autoconf was run, and used by git-version-gen. Must not | ||
33 | # be present in either $(srcdir) or $(builddir) for git-version-gen to | ||
34 | # give accurate answers during normal development with a checked out tree, | ||
35 | # but must be present in a tarball when there is no version control system. | ||
36 | # Therefore, it cannot be used in any dependencies. GNUmakefile has | ||
37 | # hooks to force a reconfigure at distribution time to get the value | ||
38 | # correct, without penalizing normal development with extra reconfigures. | ||
39 | # | ||
40 | # .version - present in a checked-out repository and in a distribution | ||
41 | # tarball. Usable in dependencies, particularly for files that don't | ||
42 | # want to depend on config.h but do want to track version changes. | ||
43 | # Delete this file prior to any autoconf run where you want to rebuild | ||
44 | # files to pick up a version string change; and leave it stale to | ||
45 | # minimize rebuild time after unrelated changes to configure sources. | ||
46 | # | ||
47 | # As with any generated file in a VC'd directory, you should add | ||
48 | # /.version to .gitignore, so that you don't accidentally commit it. | ||
49 | # .tarball-version is never generated in a VC'd directory, so needn't | ||
50 | # be listed there. | ||
51 | # | ||
52 | # Use the following line in your configure.ac, so that $(VERSION) will | ||
53 | # automatically be up-to-date each time configure is run (and note that | ||
54 | # since configure.ac no longer includes a version string, Makefile rules | ||
55 | # should not depend on configure.ac for version updates). | ||
56 | # | ||
57 | # AC_INIT([GNU project], | ||
58 | # m4_esyscmd([build-aux/git-version-gen .tarball-version]), | ||
59 | # [bug-project@example]) | ||
60 | # | ||
61 | # Then use the following lines in your Makefile.am, so that .version | ||
62 | # will be present for dependencies, and so that .version and | ||
63 | # .tarball-version will exist in distribution tarballs. | ||
64 | # | ||
65 | # EXTRA_DIST = $(top_srcdir)/.version | ||
66 | # BUILT_SOURCES = $(top_srcdir)/.version | ||
67 | # $(top_srcdir)/.version: | ||
68 | # echo $(VERSION) > $@-t && mv $@-t $@ | ||
69 | # dist-hook: | ||
70 | # echo $(VERSION) > $(distdir)/.tarball-version | ||
71 | |||
72 | |||
73 | me=$0 | ||
74 | |||
75 | version="git-version-gen $scriptversion | ||
76 | |||
77 | Copyright 2011 Free Software Foundation, Inc. | ||
78 | There is NO warranty. You may redistribute this software | ||
79 | under the terms of the GNU General Public License. | ||
80 | For more information about these matters, see the files named COPYING." | ||
81 | |||
82 | usage="\ | ||
83 | Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] | ||
84 | Print a version string. | ||
85 | |||
86 | Options: | ||
87 | |||
88 | --prefix prefix of git tags (default 'v') | ||
89 | --fallback fallback version to use if \"git --version\" fails | ||
90 | |||
91 | --help display this help and exit | ||
92 | --version output version information and exit | ||
93 | |||
94 | Running without arguments will suffice in most cases." | ||
95 | |||
96 | prefix=v | ||
97 | fallback= | ||
98 | |||
99 | while test $# -gt 0; do | ||
100 | case $1 in | ||
101 | --help) echo "$usage"; exit 0;; | ||
102 | --version) echo "$version"; exit 0;; | ||
103 | --prefix) shift; prefix="$1";; | ||
104 | --fallback) shift; fallback="$1";; | ||
105 | -*) | ||
106 | echo "$0: Unknown option '$1'." >&2 | ||
107 | echo "$0: Try '--help' for more information." >&2 | ||
108 | exit 1;; | ||
109 | *) | ||
110 | if test "x$tarball_version_file" = x; then | ||
111 | tarball_version_file="$1" | ||
112 | elif test "x$tag_sed_script" = x; then | ||
113 | tag_sed_script="$1" | ||
114 | else | ||
115 | echo "$0: extra non-option argument '$1'." >&2 | ||
116 | exit 1 | ||
117 | fi;; | ||
118 | esac | ||
119 | shift | ||
120 | done | ||
121 | |||
122 | if test "x$tarball_version_file" = x; then | ||
123 | echo "$usage" | ||
124 | exit 1 | ||
125 | fi | ||
126 | |||
127 | tag_sed_script="${tag_sed_script:-s/x/x/}" | ||
128 | |||
129 | nl=' | ||
130 | ' | ||
131 | |||
132 | # Avoid meddling by environment variable of the same name. | ||
133 | v= | ||
134 | v_from_git= | ||
135 | |||
136 | # First see if there is a tarball-only version file. | ||
137 | # then try "git describe", then default. | ||
138 | if test -f $tarball_version_file | ||
139 | then | ||
140 | v=`cat $tarball_version_file` || v= | ||
141 | case $v in | ||
142 | *$nl*) v= ;; # reject multi-line output | ||
143 | [0-9]*) ;; | ||
144 | *) v= ;; | ||
145 | esac | ||
146 | test "x$v" = x \ | ||
147 | && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 | ||
148 | fi | ||
149 | |||
150 | if test "x$v" != x | ||
151 | then | ||
152 | : # use $v | ||
153 | # Otherwise, if there is at least one git commit involving the working | ||
154 | # directory, and "git describe" output looks sensible, use that to | ||
155 | # derive a version string. | ||
156 | elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ | ||
157 | && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ | ||
158 | || git describe --abbrev=4 HEAD 2>/dev/null` \ | ||
159 | && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ | ||
160 | && case $v in | ||
161 | $prefix[0-9]*) ;; | ||
162 | *) (exit 1) ;; | ||
163 | esac | ||
164 | then | ||
165 | # Is this a new git that lists number of commits since the last | ||
166 | # tag or the previous older version that did not? | ||
167 | # Newer: v6.10-77-g0f8faeb | ||
168 | # Older: v6.10-g0f8faeb | ||
169 | case $v in | ||
170 | *-*-*) : git describe is okay three part flavor ;; | ||
171 | *-*) | ||
172 | : git describe is older two part flavor | ||
173 | # Recreate the number of commits and rewrite such that the | ||
174 | # result is the same as if we were using the newer version | ||
175 | # of git describe. | ||
176 | vtag=`echo "$v" | sed 's/-.*//'` | ||
177 | commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \ | ||
178 | || { commit_list=failed; | ||
179 | echo "$0: WARNING: git rev-list failed" 1>&2; } | ||
180 | numcommits=`echo "$commit_list" | wc -l` | ||
181 | v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; | ||
182 | test "$commit_list" = failed && v=UNKNOWN | ||
183 | ;; | ||
184 | esac | ||
185 | |||
186 | # Change the first '-' to a '.', so version-comparing tools work properly. | ||
187 | # Remove the "g" in git describe's output string, to save a byte. | ||
188 | v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`; | ||
189 | v_from_git=1 | ||
190 | elif test "x$fallback" = x || git --version >/dev/null 2>&1; then | ||
191 | v=UNKNOWN | ||
192 | else | ||
193 | v=$fallback | ||
194 | fi | ||
195 | |||
196 | v=`echo "$v" |sed "s/^$prefix//"` | ||
197 | |||
198 | # Test whether to append the "-dirty" suffix only if the version | ||
199 | # string we're using came from git. I.e., skip the test if it's "UNKNOWN" | ||
200 | # or if it came from .tarball-version. | ||
201 | if test "x$v_from_git" != x; then | ||
202 | # Don't declare a version "dirty" merely because a time stamp has changed. | ||
203 | git update-index --refresh > /dev/null 2>&1 | ||
204 | |||
205 | dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= | ||
206 | case "$dirty" in | ||
207 | '') ;; | ||
208 | *) # Append the suffix only if there isn't one already. | ||
209 | case $v in | ||
210 | *-dirty) ;; | ||
211 | *) v="$v-dirty" ;; | ||
212 | esac ;; | ||
213 | esac | ||
214 | fi | ||
215 | |||
216 | # Omit the trailing newline, so that m4_esyscmd can use the result directly. | ||
217 | echo "$v" | tr -d "$nl" | ||
218 | |||
219 | # Local variables: | ||
220 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
221 | # time-stamp-start: "scriptversion=" | ||
222 | # time-stamp-format: "%:y-%02m-%02d.%02H" | ||
223 | # time-stamp-time-zone: "UTC" | ||
224 | # time-stamp-end: "; # UTC" | ||
225 | # End: | ||
diff --git a/meta/recipes-devtools/strace/strace-4.8/run-ptest b/meta/recipes-devtools/strace/strace-4.8/run-ptest new file mode 100755 index 0000000000..133cf92d02 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | make -C tests -k runtest-TESTS | ||
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch b/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch new file mode 100644 index 0000000000..27266d9052 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Add options "aio" and "acl" to enable/disable libaio and acl support. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
6 | |||
7 | --- strace-4.8/configure.ac.orig 2013-06-21 15:37:52.145892182 +0800 | ||
8 | +++ strace-4.8/configure.ac 2013-06-21 15:45:49.029909004 +0800 | ||
9 | @@ -219,7 +219,6 @@ AC_CHECK_HEADERS(m4_normalize([ | ||
10 | netinet/sctp.h | ||
11 | poll.h | ||
12 | stropts.h | ||
13 | - sys/acl.h | ||
14 | sys/asynch.h | ||
15 | sys/conf.h | ||
16 | sys/epoll.h | ||
17 | @@ -231,6 +230,19 @@ AC_CHECK_HEADERS(m4_normalize([ | ||
18 | sys/uio.h | ||
19 | sys/vfs.h | ||
20 | ])) | ||
21 | + | ||
22 | +AC_ARG_ENABLE([acl], | ||
23 | + [AS_HELP_STRING([--enable-acl], [turn on acl support])], | ||
24 | + [case $enableval in | ||
25 | + yes) | ||
26 | + AC_CHECK_HEADERS([sys/acl.h]) | ||
27 | + ;; | ||
28 | + no) ;; | ||
29 | + *) AC_MSG_ERROR([bad value $enableval for aio option]) ;; | ||
30 | + esac] | ||
31 | + | ||
32 | +) | ||
33 | + | ||
34 | AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], | ||
35 | [], [], [#include <stddef.h> | ||
36 | #include <sys/socket.h> | ||
37 | @@ -301,10 +313,19 @@ AC_CHECK_SIZEOF([long]) | ||
38 | AC_CHECK_SIZEOF([long long]) | ||
39 | AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>]) | ||
40 | |||
41 | -AC_CHECK_HEADERS([libaio.h], [ | ||
42 | - AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>]) | ||
43 | - AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>]) | ||
44 | -]) | ||
45 | +AC_ARG_ENABLE([aio], | ||
46 | + [AS_HELP_STRING([--enable-aio], [turn on libaio support])], | ||
47 | + [case $enableval in | ||
48 | + yes) | ||
49 | + AC_CHECK_HEADERS([libaio.h], [ | ||
50 | + AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>]) | ||
51 | + AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>]) | ||
52 | + ]) | ||
53 | + ;; | ||
54 | + no) ;; | ||
55 | + *) AC_MSG_ERROR([bad value $enableval for aio option]) ;; | ||
56 | + esac] | ||
57 | +) | ||
58 | |||
59 | AC_PATH_PROG([PERL], [perl]) | ||
60 | |||
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch b/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch new file mode 100644 index 0000000000..a6579df598 --- /dev/null +++ b/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | powerpc64: fix 64-bit process detection on embedded | ||
2 | |||
3 | * syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection | ||
4 | on embedded powerpc. | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: James Yang <james.yang@freescale.com> | ||
9 | Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> | ||
10 | |||
11 | diff --git a/syscall.c.orig b/syscall.c | ||
12 | index 7efee0e..72d9453 100644 | ||
13 | --- a/syscall.c.orig | ||
14 | +++ b/syscall.c | ||
15 | @@ -1207,11 +1207,14 @@ get_scno(struct tcb *tcp) | ||
16 | /* Check for 64/32 bit mode. */ | ||
17 | if (upeek(tcp, sizeof(unsigned long)*PT_MSR, &val) < 0) | ||
18 | return -1; | ||
19 | - /* SF is bit 0 of MSR */ | ||
20 | - if (val < 0) | ||
21 | - currpers = 0; | ||
22 | - else | ||
23 | - currpers = 1; | ||
24 | + | ||
25 | + /* | ||
26 | + * Check for 64/32 bit mode. | ||
27 | + * Embedded implementations covered by Book E extension of PPC use | ||
28 | + * bit 0 (CM) of 32-bit Machine state register (MSR). | ||
29 | + * Other implementations use bit 0 (SF) of 64-bit MSR. | ||
30 | + */ | ||
31 | + currpers = (val & 0x8000000080000000) ? 0 : 1; | ||
32 | update_personality(tcp, currpers); | ||
33 | # endif | ||
34 | #elif defined(AVR32) | ||
diff --git a/meta/recipes-devtools/strace/strace_4.8.bb b/meta/recipes-devtools/strace/strace_4.8.bb new file mode 100644 index 0000000000..ed738eaad7 --- /dev/null +++ b/meta/recipes-devtools/strace/strace_4.8.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | SUMMARY = "System call tracing tool" | ||
2 | HOMEPAGE = "http://strace.sourceforge.net" | ||
3 | SECTION = "console/utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7" | ||
6 | |||
7 | SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ | ||
8 | file://git-version-gen \ | ||
9 | file://strace-add-configure-options.patch \ | ||
10 | file://Makefile-ptest.patch \ | ||
11 | file://strace-fix-64-bit-process-detection.patch \ | ||
12 | file://run-ptest \ | ||
13 | file://0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575" | ||
17 | SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8" | ||
18 | |||
19 | inherit autotools ptest | ||
20 | RDEPENDS_${PN}-ptest += "make" | ||
21 | |||
22 | PACKAGECONFIG_class-target ?= "libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" | ||
23 | |||
24 | PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio" | ||
25 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" | ||
26 | |||
27 | export INCLUDES = "-I. -I./linux" | ||
28 | |||
29 | TESTDIR = "tests" | ||
30 | |||
31 | do_configure_prepend() { | ||
32 | cp ${WORKDIR}/git-version-gen ${S} | ||
33 | } | ||
34 | |||
35 | do_install_append() { | ||
36 | # We don't ship strace-graph here because it needs perl | ||
37 | rm ${D}${bindir}/strace-graph | ||
38 | } | ||
39 | |||
40 | do_compile_ptest() { | ||
41 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
42 | } | ||
43 | |||
44 | do_install_ptest() { | ||
45 | oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} | ||
46 | } | ||
47 | |||
48 | BBCLASSEXTEND = "native" | ||