Building libgcj without optimization

Tom Tromey tromey@redhat.com
Thu Sep 12 10:22:00 GMT 2002


Andrew> Is there an easy way to make libgcj do what gcc does,
Andrew> i.e. only use -O2 when you build from the top level?

Maybe not.  Since libgcj is a target library, I think things like
GCJFLAGS will always be set when configuring it (this happens via the
top-level Makefile).  And I think we'd like the setting from configure
to end up in the Makefile by default.

Andrew> Building without optimization is a pain because -O2 doesn't
Andrew> appear in the Makefile.am but is inherited from above; there's
Andrew> nothing I can see that you could change to -O0.

My standard build script does this from the top level.

    make CXXFLAGS=-g GCJFLAGS=-g

This works for me.  And since this affects the Makefile, future builds
in the libjava build directory pick up the -g automatically.

Tom



More information about the Java mailing list