diff options
author | Joachim Nilsson <jocke@vmlinux.org> | 2010-01-03 15:46:58 (GMT) |
---|---|---|
committer | Joachim Nilsson <jocke@vmlinux.org> | 2010-01-03 15:46:58 (GMT) |
commit | c704137fd60fb149dac8703c266ba633d0592d06 (patch) | |
tree | b0cc6739ee81250fa5e6f2511fd51b61ad65d37f /patches/ltrace/0.5.3/100-allow-cross-compile.patch | |
parent | df239bc7eef2e77df1402d3ec14deb1a22d44f27 (diff) |
debug/ltrace: Add support for ltrace-0.5.3
From this version of ltrace the maintainer has removed support for
GNU Autotools, so the patch sets needed to be reworked.
Included is the latest Debian patch, by the Debian ltrace maintainer
Juan Cespedes <cespedes@debian.org>, the OpenEmbedded patches for cross
compiling, by Khem Raj <raj.khem@gmail.com> and a further set of patches
by Joachim Nilsson <jocke@vmlinux.org> for crosstool-NG.
Diffstat (limited to 'patches/ltrace/0.5.3/100-allow-cross-compile.patch')
-rw-r--r-- | patches/ltrace/0.5.3/100-allow-cross-compile.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/patches/ltrace/0.5.3/100-allow-cross-compile.patch b/patches/ltrace/0.5.3/100-allow-cross-compile.patch new file mode 100644 index 0000000..58572cd --- /dev/null +++ b/patches/ltrace/0.5.3/100-allow-cross-compile.patch @@ -0,0 +1,84 @@ +This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com> + +http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1 + +Index: ltrace-0.5.3/common.h +=================================================================== +--- ltrace-0.5.3.orig/common.h 2009-10-23 23:13:45.700282578 -0700 ++++ ltrace-0.5.3/common.h 2009-10-23 23:14:13.550371553 -0700 +@@ -1,3 +1,5 @@ ++#ifndef COMMON_H ++#define COMMON_H + #include <sys/types.h> + #include <sys/time.h> + #include <stdio.h> +@@ -251,3 +253,5 @@ extern void * sym2addr(Process *, struct + #if 0 /* not yet */ + extern int umoven(Process * proc, void * addr, int len, void * laddr); + #endif ++#endif ++ +Index: ltrace-0.5.3/configure +=================================================================== +--- ltrace-0.5.3.orig/configure 2009-10-23 23:13:45.630316494 -0700 ++++ ltrace-0.5.3/configure 2009-10-23 23:13:59.672869527 -0700 +@@ -30,7 +30,7 @@ int main () { + return cplus_demangle(); + } + EOF +-if gcc conftest.c -liberty 2>/dev/null ++if $CC conftest.c -liberty 2>/dev/null + then + HAVE_LIBIBERTY=1 + echo "yes" +@@ -48,7 +48,7 @@ int main () { + return __cxa_demangle(); + } + EOF +-if gcc conftest.c -lsupc++ 2>/dev/null ++if $CC conftest.c -lsupc++ 2>/dev/null + then + HAVE_LIBSUPC__=1 + echo "yes" +@@ -67,7 +67,7 @@ int main () { + return 0; + } + EOF +-if gcc conftest.c 2>/dev/null ++if $CC conftest.c 2>/dev/null + then + HAVE_ELF_C_READ_MMAP=1 + echo "yes" +@@ -77,15 +77,12 @@ else + fi + rm -f conftest.c a.out + +-CC=gcc +-CPPFLAGS=' -I /usr/include/libelf' + CFLAGS='-g -O2' + LIBS='-lelf -lsupc++ -liberty ' +-INSTALL='/usr/bin/install -c' ++INSTALL='install -c' + iquote='-iquote ' + iquoteend='' + +-prefix=/usr/local + sysconfdir='${prefix}/etc' + bindir='${prefix}/bin' + mandir='${prefix}/share/man' +Index: ltrace-0.5.3/debug.h +=================================================================== +--- ltrace-0.5.3.orig/debug.h 2009-10-23 23:13:45.670276809 -0700 ++++ ltrace-0.5.3/debug.h 2009-10-23 23:14:26.440319785 -0700 +@@ -1,3 +1,5 @@ ++#ifndef DEBUG_H ++#define DEBUG_H + #include <features.h> + + /* debug levels: +@@ -14,4 +16,4 @@ void debug_(int level, const char *file, + int xinfdump(long, void *, int); + + # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr) +- ++#endif |