Unfortunately, builds for the MIPS arch are known to be BROKEN (see [1])!

The ifdefs as suggested by Petr (ltrace maintainer) do not work on my system!
 ...
 #ifdef __mips__ <--- This ifdef was used in previous releases.
 #ifdef __mips   <--- Should be OK, too (see my checks below).
 ...
 #endif

The cpp and gcc binaries from my own built cross-toolchain seem to be OK.

 GCC_VER="4.7.2-RC-20120914"
 UCLIBC_VER="0.9.33.2"
 BUILD_DIR="$HOME/src/freetz/freetz-git"

 
CROSS_TOOLCHAIN_BIN_DIR="${BUILD_DIR}/toolchain/build/mipsel_gcc-${GCC_VER}_uClibc-${UCLIBC_VER}/mipsel-linux-uclibc/bin"

 export PATH=$PATH:$CROSS_TOOLCHAIN_BIN_DIR

 mipsel-linux-uclibc-cpp  -dM /dev/null | grep '\__mips' | egrep -v 
'abicalls|fpr|soft_float'
 [ OUTPUT ]
 #define __mips__ 1
 #define __mips 1

 mipsel-linux-uclibc-gcc -E -Wp,-dM -x c /dev/null -o /dev/stdout | grep 
'\__mips' | egrep -v 'abicalls|fpr|soft_float'
 [ OUTPUT ] 
 #define __mips__ 1
 #define __mips 1

That line works fine here in my Freetz build-system to fix the issue:
 ...
 #if defined (host_mips) 
 ...
 #endif

The more aggressive fix included here works as well.

Edgar (ltrace MIPS maintainer) is cooking up a "real" fix, so this here is a
temporary workaround!
For a "WIP" patch from Edgar see [2] and as usually feedback is welcome.

[1] 
http://lists.alioth.debian.org/pipermail/ltrace-devel/2012-November/000764.html
[2] 
http://lists.alioth.debian.org/pipermail/ltrace-devel/2012-November/000770.html

Signed-off-by: Sedat Dilek <[email protected]>
---
 proc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git proc.c proc.c
index e17b9ed..995ac79 100644
--- proc.c
+++ proc.c
@@ -752,8 +752,10 @@ breakpoint_for_symbol(struct library_symbol *libsym, 
struct Process *proc)
        struct breakpoint *bp = dict_find_entry(proc->breakpoints,
                                                bp_addr);
        if (bp != NULL) {
+#if 0
                assert(bp->libsym == NULL);
                bp->libsym = libsym;
+#endif
                return 0;
        }
 
-- 
1.7.9.5


_______________________________________________
Ltrace-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel

Reply via email to