[PATCH] libjava: Add option to disable BC ABI in libgcj.

David Daney ddaney@avtrex.com
Fri Dec 21 23:27:00 GMT 2007


Static linking with libgcj does not work well when portions are compiled
with the BC ABI.  The problem is that the compile time linker is not
able to resolve all the needed dependencies.

This patch adds a new configure option (--disable-libgcj-bc) that forces
all code in libgcj to be compiled with the C++ ABI.  The default is to
compile libgcj 'normally'.  This option would only be used by those
statically linking to libgcj.

Tested on i686-pc-linux-gnu with no failures in libjava testsuite.  I
also verified by inspecting build output that -findirect-dispatch
-fno-indirect-classes is being passed when compiling the BC ABI files.

OK to commit?

gcc/
2007-12-21  David Daney  <ddaney@avtrex.com>

    * doc/install.texi (disable-libgcj-bc): Document new option.

libjava/
2007-12-21  David Daney  <ddaney@avtrex.com>

    * scripts/makemake.tcl (emit_bc_rule): Use $(LIBGCJ_BC_FLAGS)
    instead of -findirect-dispatch -fno-indirect-classes.
    * configure.ac (libgcj-bc): New AC_ARG_ENABLE.
    (SUPPRESS_LIBGCJ_BC): New AM_CONDITIONAL.
    * Makefile.am (LIBGCJ_BC_FLAGS): New variable.
    * Makefile.in: Regenerate.
    * include/Makefile.in: Same.
    * testsuite/Makefile.in: Same.
    * configure: Same.
    * gcj/Makefile.in: Same.
    * sources.am: Same.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgcj-bc.diff
Type: text/x-patch
Size: 2681 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071221/f6f248cf/attachment.bin>


More information about the Gcc-patches mailing list