GCJ / libjava 'debug' build -O0
Andrew Haley
aph@redhat.com
Thu Jul 1 09:54:00 GMT 2004
Peter Blemel writes:
>
> I'm just now getting back to working on my GCJ cross compiler for a powerpc
> embedded system. I have everything compiling, linking, loading, and even
> starting on my embedded system(!) but I'm chasing down a class loading
> problem.
>
> My question involves making gdb/insight stick to the right lines. The
> compiler collection was built with the default -g -O2, but the -O2 is making
> stepping through the 'standard' java program startup where class loading is
> performed a bit troublesome because the optimization makes the code jump
> around a bit in the debugger. I don't want to change the defaults for the
> rest of the compiler suite, I just want to have libjava build -g -O0. What
> is the best way to do this?
The best way? I dunno! :-)
What I do is edit java/Makefile and subsitite -O2 with -O0 and then rebuild.
Like this:
cd i686-pc-linux-gnu/libjava/
(maybe "make clean" if you really want to rebuild everything)
make install-exec
Andrew.
More information about the Java-patches
mailing list