|
From: Florian K. <br...@ac...> - 2008-05-12 21:25:52
|
On Monday 12 May 2008 3:17:02 pm Bart Van Assche wrote: > Hello, > > I would like to modify the Valgrind configure.in and Makefile.am files > such that Valgrind can be cross-compiled. One issue I encountered was > that VEX/auxprogs/genoffsets has to be executed while Valgrind is > built. Yes, it would be nice if this step could be eliminated. > I have modified configure.in locally such that it not only > detects the name of the cross-compiler, but also the path of the > native compiler. I modified various makefiles such that > VEX/auxprogs/genoffsets is built natively. I hope this is safe and > that the output of the genoffsets program does not depend on the CPU > it is run on, but only on the -m32/-m64 flags ? > I can't answer that with a certainty but would guess it ought to be the compiler for the target. Assuming that the target compiler is needed, wouldn't it be possible to eliminate genoffsets altogether and distribute the definitions that it generates to the various libvex_guest_XYZZY.h files? E.g. libvex_guest_ppc64.h would include #define OFFSET_ppc64_GPR0 offsetof(VexGuestPPC64State,guest_GPR0) and so on and similarly for the other targets. There is only one guest state active for a given valgrind instance so we only need one set of these OFFSETs at a time. Or am I missing something ? Cheers, Florian |