|
From: Dmitry Z. <zh...@is...> - 2009-12-23 09:19:49
|
Hello. It seems like ARM branch can't be compiled with recent versions of GCC (stock GCC 4.4 and CodeSourcery arm-2008q3 or even earlier). A patch is attached that allows building of Valgrind. Probably the reason for the failure is in the GCC version 4.4 changelog: "On ARM EABI targets, the C++ mangling of the va_list type has been changed to conform to the current revision of the EABI". This should mean that for ARM va_list is not integer (but a structure it seems) anymore which is still true for other platforms that Valgrind supports. Valgrind sources are written in such a way that it wants va_list to be able to be casted to an integer type implicitly. This is no longer available in current GCC for ARM. Seems like CodeSourcery made this change a little bit earlier (as original GCC version 4.3.2 is able to build Valgrind without errors). Please review the patch. It only makes a cast using union. Following is the error log: In file included from m_debuglog.c:57: ../include/valgrind.h: In function 'VALGRIND_PRINTF': ../include/valgrind.h:4186: error: aggregate value used where an integer was expected ../include/valgrind.h: In function 'VALGRIND_PRINTF_BACKTRACE': ../include/valgrind.h:4201: error: aggregate value used where an integer was expected make[3]: *** [libcoregrind_arm_linux_a-m_debuglog.o] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .deps/libcoregrind_arm_linux_a-m_debugger.Tpo .deps/libcoregrind_arm_linux_a-m_debugger.Po mv -f .deps/libcoregrind_arm_linux_a-m_commandline.Tpo .deps/libcoregrind_arm_linux_a-m_commandline.Po make[3]: Leaving directory `/home/batuzovk/valgrind/valgrind-clean/coregrind' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/batuzovk/valgrind/valgrind-clean/coregrind' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/batuzovk/valgrind/valgrind-clean' make: *** [all] Error 2 Regards, Dmitry |