summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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_0.5.3.bb81
7 files changed, 266 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch b/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch
new file mode 100644
index 000000000..1d0432f2d
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/add-sysdep.patch
@@ -0,0 +1,13 @@
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
new file mode 100644
index 000000000..4784deb6d
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/ltrace-compile.patch
@@ -0,0 +1,80 @@
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
new file mode 100644
index 000000000..b9e5f7f3e
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/ltrace-fix-sysdep_h-dependency.patch
@@ -0,0 +1,33 @@
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
new file mode 100644
index 000000000..2af193d1d
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/ltrace-mips-remove-CP.patch
@@ -0,0 +1,12 @@
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
new file mode 100644
index 000000000..6df5e211a
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/ltrace-mips.patch
@@ -0,0 +1,36 @@
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
new file mode 100644
index 000000000..d5ea0f0bf
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/files/ltrace-ppc.patch
@@ -0,0 +1,11 @@
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_0.5.3.bb b/meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb
new file mode 100644
index 000000000..7625dd864
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_0.5.3.bb
@@ -0,0 +1,81 @@
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 = "r3"
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.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] = "969baa0900646c0262b2d505b9fef154"
81SRC_URI[patch.sha256sum] = "f647d7c2f2b0d1dbddd632f3a17fef670aed3ebf5fbe6c1633337acac1eba8e3"