1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/ltrace/0.5.3/100-allow-cross-compile.patch Wed Jan 09 18:52:00 2013 +0100
1.3 @@ -0,0 +1,84 @@
1.4 +This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com>
1.5 +
1.6 +http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1
1.7 +
1.8 +Index: ltrace-0.5.3/common.h
1.9 +===================================================================
1.10 +--- ltrace-0.5.3.orig/common.h 2009-10-23 23:13:45.700282578 -0700
1.11 ++++ ltrace-0.5.3/common.h 2009-10-23 23:14:13.550371553 -0700
1.12 +@@ -1,3 +1,5 @@
1.13 ++#ifndef COMMON_H
1.14 ++#define COMMON_H
1.15 + #include <sys/types.h>
1.16 + #include <sys/time.h>
1.17 + #include <stdio.h>
1.18 +@@ -251,3 +253,5 @@ extern void * sym2addr(Process *, struct
1.19 + #if 0 /* not yet */
1.20 + extern int umoven(Process * proc, void * addr, int len, void * laddr);
1.21 + #endif
1.22 ++#endif
1.23 ++
1.24 +Index: ltrace-0.5.3/configure
1.25 +===================================================================
1.26 +--- ltrace-0.5.3.orig/configure 2009-10-23 23:13:45.630316494 -0700
1.27 ++++ ltrace-0.5.3/configure 2009-10-23 23:13:59.672869527 -0700
1.28 +@@ -30,7 +30,7 @@ int main () {
1.29 + return cplus_demangle();
1.30 + }
1.31 + EOF
1.32 +-if gcc conftest.c -liberty 2>/dev/null
1.33 ++if $CC conftest.c -liberty 2>/dev/null
1.34 + then
1.35 + HAVE_LIBIBERTY=1
1.36 + echo "yes"
1.37 +@@ -48,7 +48,7 @@ int main () {
1.38 + return __cxa_demangle();
1.39 + }
1.40 + EOF
1.41 +-if gcc conftest.c -lsupc++ 2>/dev/null
1.42 ++if $CC conftest.c -lsupc++ 2>/dev/null
1.43 + then
1.44 + HAVE_LIBSUPC__=1
1.45 + echo "yes"
1.46 +@@ -67,7 +67,7 @@ int main () {
1.47 + return 0;
1.48 + }
1.49 + EOF
1.50 +-if gcc conftest.c 2>/dev/null
1.51 ++if $CC conftest.c 2>/dev/null
1.52 + then
1.53 + HAVE_ELF_C_READ_MMAP=1
1.54 + echo "yes"
1.55 +@@ -77,15 +77,12 @@ else
1.56 + fi
1.57 + rm -f conftest.c a.out
1.58 +
1.59 +-CC=gcc
1.60 +-CPPFLAGS=' -I /usr/include/libelf'
1.61 + CFLAGS='-g -O2'
1.62 + LIBS='-lelf -lsupc++ -liberty '
1.63 +-INSTALL='/usr/bin/install -c'
1.64 ++INSTALL='install -c'
1.65 + iquote='-iquote '
1.66 + iquoteend=''
1.67 +
1.68 +-prefix=/usr/local
1.69 + sysconfdir='${prefix}/etc'
1.70 + bindir='${prefix}/bin'
1.71 + mandir='${prefix}/share/man'
1.72 +Index: ltrace-0.5.3/debug.h
1.73 +===================================================================
1.74 +--- ltrace-0.5.3.orig/debug.h 2009-10-23 23:13:45.670276809 -0700
1.75 ++++ ltrace-0.5.3/debug.h 2009-10-23 23:14:26.440319785 -0700
1.76 +@@ -1,3 +1,5 @@
1.77 ++#ifndef DEBUG_H
1.78 ++#define DEBUG_H
1.79 + #include <features.h>
1.80 +
1.81 + /* debug levels:
1.82 +@@ -14,4 +16,4 @@ void debug_(int level, const char *file,
1.83 + int xinfdump(long, void *, int);
1.84 +
1.85 + # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr)
1.86 +-
1.87 ++#endif