[Patch, Java]: Add --enable-reduced-reflection configure option.

David Daney ddaney@avtrex.com
Tue Aug 26 00:54:00 GMT 2008


This patch adds a new configure option to easily allow libgcj to be 
built with the -freduced-reflection option.  This reduces the size (as 
reported by the size command) of libgcj by about 5% on i686-pc-linux. 
Although the resulting library has reduced functionality (as 
serialization, RMI and CORBA don't work with -freduced-reflection), the 
size savings can be important in some circumstances (embedded devices).


The name of the option is --enable-reduced-reflection, although I 
considered and rejected --with-reduced-reflection.


Tested on i686-pc-linux.  Where as expected most -findirect-dispatch 
execution tests failed as well as the interpreter tests and several 
other random tests that rely on accurate reflection meta-data.


OK to commit?

gcc/
2008-08-25  David Daney  <ddaney@avtrex.com>

	* doc/install.texi (--enable-reduced-reflection): Document new option.

libjava/
2008-08-25  David Daney  <ddaney@avtrex.com>

	* configure.ac (reduced-reflection): New AC_ARG_ENABLE.
	(build_libgcj_reduced_reflection): New variable.
	(BUILD_LIBGCJ_REDUCED_REFLECTION): New AM_CONDITIONAL.
	* Makefile.am (LIBGCJ_REDUCED_REFLECTION_FLAGS): New variable.
	(%.lo: %.list): Add LIBGCJ_REDUCED_REFLECTION_FLAGS to compile
	command.
	(java/util/concurrent.lo, java/util/concurrent/atomic.lo,
	java/util/concurrent/locks.lo): Override
	LIBGCJ_REDUCED_REFLECTION_FLAGS.
	* include/Makefile.in, testsuite/Makefile.in, gcj/Makefile.in,
	configure: Regenerate.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: enable-reduced-reflection.patch
Type: text/x-patch
Size: 2963 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080826/96b66be9/attachment.bin>


More information about the Gcc-patches mailing list