This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: GCJ / libjava 'debug' build -O0
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Peter Blemel <pblemel at hotmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Wed, 30 Jun 2004 23:47:25 -0400
- Subject: Re: GCJ / libjava 'debug' build -O0
- References: <BAY2-F328IWg8fl4PrJ0005c2bf@hotmail.com>
Peter Blemel wrote:
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?
From your libjava build directory:
make CXXFLAGS=-g GCJFLAGS=-g CPPFLAGS=-g
If you want to always build libjava without -O, you can edit the
Makefile and remove the "-O2" from the default settings of these flags.
Regards
Bryce