summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/ltrace
diff options
context:
space:
mode:
authorChong.Lu@windriver.com <Chong.Lu@windriver.com>2014-04-11 17:14:45 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-05-03 20:45:00 +0200
commit59f41a800fe76994f7719e913c3c679926d3bdcf (patch)
tree1045f6829ce148774028b99a20dc132d4df8b217 /meta-oe/recipes-devtools/ltrace
parent8115e1205911521f3f407d261a2c3b6bf6d2511d (diff)
downloadmeta-openembedded-59f41a800fe76994f7719e913c3c679926d3bdcf.tar.gz
ltrace: update to version 0.7.90
Upgrade ltrace to 0.7.90. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/ltrace')
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch13
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/ltrace-compile.patch80
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/ltrace-fix-sysdep_h-dependency.patch33
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/ltrace-mips-remove-CP.patch12
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/ltrace-mips.patch36
-rw-r--r--meta-oe/recipes-devtools/ltrace/files/ltrace-ppc.patch11
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace-git/ltrace-0.7.2-unused-typedef.patch49
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb81
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_git.bb25
9 files changed, 74 insertions, 266 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch b/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch
deleted file mode 100644
index 1d0432f2d..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1Index: ltrace-0.5.3/Makefile.in
2===================================================================
3--- ltrace-0.5.3.orig/Makefile.in 2009-10-23 22:06:08.130304691 -0700
4+++ ltrace-0.5.3/Makefile.in 2009-10-23 22:06:53.160369614 -0700
5@@ -39,6 +39,8 @@ ltrace: main.o libltrace.a
6 libltrace.a: sysdeps/sysdep.o $(OBJ)
7 $(AR) rcv $@ $^
8
9+$(OBJ): sysdeps/sysdep.o
10+
11 sysdeps/sysdep.o: dummy
12 $(MAKE) -C sysdeps/$(OS)
13
diff --git a/meta-oe/recipes-devtools/ltrace/files/ltrace-compile.patch b/meta-oe/recipes-devtools/ltrace/files/ltrace-compile.patch
deleted file mode 100644
index 4784deb6d..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/ltrace-compile.patch
+++ /dev/null
@@ -1,80 +0,0 @@
1Index: ltrace-0.5.3/common.h
2===================================================================
3--- ltrace-0.5.3.orig/common.h 2009-10-23 23:13:45.700282578 -0700
4+++ ltrace-0.5.3/common.h 2009-10-23 23:14:13.550371553 -0700
5@@ -1,3 +1,5 @@
6+#ifndef COMMON_H
7+#define COMMON_H
8 #include <sys/types.h>
9 #include <sys/time.h>
10 #include <stdio.h>
11@@ -251,3 +253,5 @@ extern void * sym2addr(Process *, struct
12 #if 0 /* not yet */
13 extern int umoven(Process * proc, void * addr, int len, void * laddr);
14 #endif
15+#endif
16+
17Index: ltrace-0.5.3/configure
18===================================================================
19--- ltrace-0.5.3.orig/configure 2009-10-23 23:13:45.630316494 -0700
20+++ ltrace-0.5.3/configure 2009-10-23 23:13:59.672869527 -0700
21@@ -30,7 +30,7 @@ int main () {
22 return cplus_demangle();
23 }
24 EOF
25-if gcc conftest.c -liberty 2>/dev/null
26+if $CC conftest.c -liberty 2>/dev/null
27 then
28 HAVE_LIBIBERTY=1
29 echo "yes"
30@@ -48,7 +48,7 @@ int main () {
31 return __cxa_demangle();
32 }
33 EOF
34-if gcc conftest.c -lsupc++ 2>/dev/null
35+if $CC conftest.c -lsupc++ 2>/dev/null
36 then
37 HAVE_LIBSUPC__=1
38 echo "yes"
39@@ -67,7 +67,7 @@ int main () {
40 return 0;
41 }
42 EOF
43-if gcc conftest.c 2>/dev/null
44+if $CC conftest.c 2>/dev/null
45 then
46 HAVE_ELF_C_READ_MMAP=1
47 echo "yes"
48@@ -77,15 +77,12 @@ else
49 fi
50 rm -f conftest.c a.out
51
52-CC=gcc
53-CPPFLAGS=' -I /usr/include/libelf'
54 CFLAGS='-g -O2'
55 LIBS='-lelf -lsupc++ -liberty '
56-INSTALL='/usr/bin/install -c'
57+INSTALL='install -c'
58 iquote='-iquote '
59 iquoteend=''
60
61-prefix=/usr/local
62 sysconfdir='${prefix}/etc'
63 bindir='${prefix}/bin'
64 mandir='${prefix}/share/man'
65Index: ltrace-0.5.3/debug.h
66===================================================================
67--- ltrace-0.5.3.orig/debug.h 2009-10-23 23:13:45.670276809 -0700
68+++ ltrace-0.5.3/debug.h 2009-10-23 23:14:26.440319785 -0700
69@@ -1,3 +1,5 @@
70+#ifndef DEBUG_H
71+#define DEBUG_H
72 #include <features.h>
73
74 /* debug levels:
75@@ -14,4 +16,4 @@ void debug_(int level, const char *file,
76 int xinfdump(long, void *, int);
77
78 # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr)
79-
80+#endif
diff --git a/meta-oe/recipes-devtools/ltrace/files/ltrace-fix-sysdep_h-dependency.patch b/meta-oe/recipes-devtools/ltrace/files/ltrace-fix-sysdep_h-dependency.patch
deleted file mode 100644
index b9e5f7f3e..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/ltrace-fix-sysdep_h-dependency.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Index: ltrace-0.5.3/sysdeps/linux-gnu/Makefile
2===================================================================
3--- ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile
4+++ ltrace-0.5.3/sysdeps/linux-gnu/Makefile
5@@ -12,7 +12,10 @@ CPPFLAGS += -I$(TOPDIR)/sysdeps/linux-gn
6
7 OBJ = events.o trace.o proc.o breakpoint.o
8
9-all: sysdep.h signalent.h syscallent.h arch_syscallent.h signalent1.h syscallent1.h ../sysdep.o
10+HDRS = sysdep.h signalent.h syscallent.h arch_syscallent.h \
11+ signalent1.h syscallent1.h
12+
13+all: ../sysdep.o
14
15 sysdep.h: $(ARCH)/arch.h
16 cat $(ARCH)/arch.h > sysdep.h
17@@ -49,12 +52,14 @@ arch_syscallent.h:
18 os.o: $(OBJ)
19 $(CC) -nostdlib -r -o os.o $(OBJ)
20
21+$(OBJ): $(HDRS)
22+
23 $(ARCH)/arch.o: dummy
24 $(MAKE) -C $(ARCH)
25
26 clean:
27 $(MAKE) -C $(ARCH) clean
28- rm -f $(OBJ) sysdep.h signalent.h signalent1.h syscallent.h arch_syscallent.h
29- rm -f syscallent1.h os.o sysdep.o ../sysdep.o
30+ rm -f $(HDRS)
31+ rm -f $(OBJ) os.o sysdep.o ../sysdep.o
32
33 dummy:
diff --git a/meta-oe/recipes-devtools/ltrace/files/ltrace-mips-remove-CP.patch b/meta-oe/recipes-devtools/ltrace/files/ltrace-mips-remove-CP.patch
deleted file mode 100644
index 2af193d1d..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/ltrace-mips-remove-CP.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/trace.c
2===================================================================
3--- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/trace.c 2009-10-23 23:15:59.822783128 -0700
4+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/trace.c 2009-10-23 23:16:10.441268788 -0700
5@@ -127,7 +127,6 @@ gimme_arg(enum tof type, Process *proc,
6 return ret;
7 } else {
8 // If we need this, I think we can look at [sp+16] for arg_num==4.
9- CP;
10 return 0;
11 }
12 }
diff --git a/meta-oe/recipes-devtools/ltrace/files/ltrace-mips.patch b/meta-oe/recipes-devtools/ltrace/files/ltrace-mips.patch
deleted file mode 100644
index 6df5e211a..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/ltrace-mips.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/plt.c
2===================================================================
3--- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/plt.c 2009-10-23 23:25:59.292780574 -0700
4+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/plt.c 2009-10-23 23:26:22.671522220 -0700
5@@ -1,4 +1,4 @@
6-#include <debug.h>
7+#include "debug.h"
8 #include <gelf.h>
9 #include <sys/ptrace.h>
10 #include "common.h"
11Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/regs.c
12===================================================================
13--- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/regs.c 2009-10-23 23:25:59.312777529 -0700
14+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/regs.c 2009-10-23 23:26:08.190311896 -0700
15@@ -4,7 +4,6 @@
16 #include <sys/types.h>
17 #include <sys/ptrace.h>
18 #include <asm/ptrace.h>
19-#include <linux/user.h>
20
21 #include "common.h"
22 #include "mipsel.h"
23Index: ltrace-0.5.3/handle_event.c
24===================================================================
25--- ltrace-0.5.3.orig/handle_event.c 2009-10-23 23:29:48.780274445 -0700
26+++ ltrace-0.5.3/handle_event.c 2009-10-23 23:37:32.260284055 -0700
27@@ -573,7 +573,8 @@ handle_breakpoint(Event *event) {
28 void *old_addr;
29 struct library_symbol *sym= event->proc->callstack[i].c_un.libfunc;
30 assert(sym);
31- old_addr = dict_find_entry(event->proc->breakpoints, sym2addr(event->proc, sym))->addr;
32+ struct Breakpoint *tbp = dict_find_entry(event->proc->breakpoints, sym2addr(event->proc, sym));
33+ old_addr = tbp->addr;
34 addr=sym2addr(event->proc,sym);
35 assert(old_addr !=0 && addr !=0);
36 if(addr != old_addr){
diff --git a/meta-oe/recipes-devtools/ltrace/files/ltrace-ppc.patch b/meta-oe/recipes-devtools/ltrace/files/ltrace-ppc.patch
deleted file mode 100644
index d5ea0f0bf..000000000
--- a/meta-oe/recipes-devtools/ltrace/files/ltrace-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: ltrace-0.5.3/sysdeps/linux-gnu/ppc/plt.c
2===================================================================
3--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ppc/plt.c 2009-11-15 03:46:14.459233772 +0300
4+++ ltrace-0.5.3/sysdeps/linux-gnu/ppc/plt.c 2009-11-15 03:46:25.299232646 +0300
5@@ -1,5 +1,6 @@
6 #include <gelf.h>
7 #include "common.h"
8+#include "ptrace.h"
9
10 GElf_Addr
11 arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace-git/ltrace-0.7.2-unused-typedef.patch b/meta-oe/recipes-devtools/ltrace/ltrace-git/ltrace-0.7.2-unused-typedef.patch
new file mode 100644
index 000000000..8f3c0ecea
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace-git/ltrace-0.7.2-unused-typedef.patch
@@ -0,0 +1,49 @@
1diff --git a/value.c b/value.c
2index d18db17..b98298e 100644
3--- a/value.c
4+++ b/value.c
5@@ -1,6 +1,6 @@
6 /*
7 * This file is part of ltrace.
8- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc.
9+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13@@ -282,9 +282,9 @@ value_init_deref(struct value *ret_val, struct value *valp)
14 if (value_extract_word(valp, &l, NULL) < 0)
15 return -1;
16
17- /* We need "long" to be long enough to hold platform
18+ /* We need "long" to be long enough to hold target
19 * pointers. */
20- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))];
21+ assert(sizeof(l) >= sizeof(arch_addr_t));
22
23 value_common_init(ret_val, valp->inferior, valp,
24 valp->type->u.ptr_info.info, 0);
25diff --git a/lens_default.c b/lens_default.c
26index ed3d0e1..5d00814 100644
27--- a/lens_default.c
28+++ b/lens_default.c
29@@ -1,6 +1,6 @@
30 /*
31 * This file is part of ltrace.
32- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc.
33+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
34 * Copyright (C) 1998,2004,2007,2008,2009 Juan Cespedes
35 * Copyright (C) 2006 Ian Wienand
36 * Copyright (C) 2006 Steve Fink
37@@ -342,9 +342,9 @@ format_array(FILE *stream, struct value *value, struct value_dict *arguments,
38 struct expr_node *length, size_t maxlen, int before,
39 const char *open, const char *close, const char *delim)
40 {
41- /* We need "long" to be long enough to cover the whole address
42- * space. */
43- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))];
44+ /* We need "long" to be long enough to cover the whole target
45+ * address space. */
46+ assert(sizeof(long) >= sizeof(arch_addr_t));
47 long l;
48 if (expr_eval_word(length, value, arguments, &l) < 0)
49 return -1;
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb b/meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb
deleted file mode 100644
index 7cefa769b..000000000
--- a/meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb
+++ /dev/null
@@ -1,81 +0,0 @@
1DESCRIPTION = "ltrace shows runtime library call information for dynamically linked executables."
2HOMEPAGE = "http://ltrace.alioth.debian.org"
3SECTION = "devel"
4DEPENDS = "elfutils binutils"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
7
8PR = "r5"
9
10# ltrace is not ported to sh3/sh4 targets at this time
11COMPATIBLE_TARGET_SYS = "(?!sh[34])"
12
13SRC_URI = "\
14 ${DEBIAN_MIRROR}/main/l/ltrace/ltrace_${PV}.orig.tar.gz;name=archive \
15 ${DEBIAN_MIRROR}/main/l/ltrace/ltrace_${PV}-2.1.diff.gz;name=patch \
16 file://add-sysdep.patch \
17 file://ltrace-compile.patch \
18 file://ltrace-mips-remove-CP.patch \
19 file://ltrace-mips.patch \
20 file://ltrace-ppc.patch \
21 file://ltrace-fix-sysdep_h-dependency.patch \
22"
23inherit autotools
24
25export TARGET_CFLAGS = "${SELECTED_OPTIMIZATION} -isystem ${STAGING_INCDIR}"
26TARGET_CC_ARCH += "${LDFLAGS}"
27
28do_configure_prepend() {
29 case ${TARGET_ARCH} in
30 arm*) ln -sf ./linux-gnu sysdeps/linux-gnueabi ;;
31 mips*) ln -sf ./mipsel sysdeps/linux-gnu/mips ;;
32 esac
33 sed -e 's:uname -m:echo @HOST_CPU@:' \
34 sysdeps/linux-gnu/Makefile > sysdeps/linux-gnu/Makefile.in
35
36}
37
38do_compile() {
39 case ${TARGET_ARCH} in
40 alpha*) LTRACE_ARCH=alpha ;;
41 arm*) LTRACE_ARCH=arm ;;
42 cris*) LTRACE_ARCH=cris ;;
43 hppa*) LTRACE_ARCH=parisc ;;
44 i*86*) LTRACE_ARCH=i386 ;;
45 ia64*) LTRACE_ARCH=ia64 ;;
46 mips*) LTRACE_ARCH=mips ;;
47 m68k*) LTRACE_ARCH=m68k ;;
48 powerpc*) LTRACE_ARCH=ppc ;;
49 s390*) LTRACE_ARCH=s390 ;;
50 sh*) LTRACE_ARCH=sh ;;
51 sparc64*) LTRACE_ARCH=sparc64 ;;
52 sparc*) LTRACE_ARCH=sparc ;;
53 x86_64*) LTRACE_ARCH=x86_64 ;;
54 esac
55 oe_runmake LDFLAGS="${TARGET_LDFLAGS}" LIBS="-lsupc++ -liberty -Wl,-Bstatic -lelf -Wl,-Bdynamic" ${EXTRA_OEMAKE} ARCH=${LTRACE_ARCH}
56}
57
58do_install() {
59 case ${TARGET_ARCH} in
60 alpha*) LTRACE_ARCH=alpha ;;
61 arm*) LTRACE_ARCH=arm ;;
62 cris*) LTRACE_ARCH=cris ;;
63 hppa*) LTRACE_ARCH=parisc ;;
64 i*86*) LTRACE_ARCH=i386 ;;
65 ia64*) LTRACE_ARCH=ia64 ;;
66 mips*) LTRACE_ARCH=mips ;;
67 m68k*) LTRACE_ARCH=m68k ;;
68 powerpc*) LTRACE_ARCH=ppc ;;
69 s390*) LTRACE_ARCH=s390 ;;
70 sh*) LTRACE_ARCH=sh ;;
71 sparc64*) LTRACE_ARCH=sparc64 ;;
72 sparc*) LTRACE_ARCH=sparc ;;
73 x86_64*) LTRACE_ARCH=x86_64 ;;
74 esac
75 oe_runmake install ${EXTRA_OEMAKE} ARCH=${LTRACE_ARCH} DESTDIR=${D}
76}
77
78SRC_URI[archive.md5sum] = "3fa7fe715ab879db08bd06d1d59fd90f"
79SRC_URI[archive.sha256sum] = "5c6627d6d5a98a92ca4661cfc16378b182cc46a9ec479ebf7e6121ee3fe2be32"
80SRC_URI[patch.md5sum] = "38bc944c53ab602a7854aa4fa71c1f46"
81SRC_URI[patch.sha256sum] = "4c57df94020f2bed90d948f757ca7786796ca9218274764b24f61c502d9ef4f6"
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
new file mode 100644
index 000000000..149af52dc
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -0,0 +1,25 @@
1SUMMARY = "ltrace intercepts and records dynamic library calls"
2
3DESCRIPTION = "ltrace intercepts and records dynamic library calls \
4which are called by an executed process and the signals received by that process. \
5It can also intercept and print the system calls executed by the program.\
6"
7HOMEPAGE = "http://ltrace.org/"
8
9LICENSE = "GPLv2"
10LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
11
12SRCREV = "f44b28421979cec88d6d6a778fc27a8cd514f508"
13
14DEPENDS = "elfutils"
15RDEPENDS_${PN} = "elfutils"
16SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git \
17 file://ltrace-0.7.2-unused-typedef.patch \
18 "
19S = "${WORKDIR}/git"
20
21inherit autotools
22
23do_configure_prepend () {
24 ./autogen.sh
25}