This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
PATCH to build libgij
- From: Per Bothner <per at bothner dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 24 Jun 2004 13:03:15 -0700
- Subject: PATCH to build libgij
This patch creates a new libgij library.
I'll add documentation before I check this in (assuming
the ideas doesn't get shot down), but the idea is this:
When linking a gcj-compiled executable, you normally have
to specify a --main flag. This patch allows you to instead
use a -lgij flag, which links in the 'main' function from gij.cc.
The resulting executable can be statically or dynamically linked,
and supports the command-line flags of gij. Thus you can choose
at run-time which Java main method to invoke, and you can pass
other flags, such as -D flags.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
2004-06-24 Per Bothner <per@bothner.com>
* Makefile.am: Add rules to build libgij from just gij.cc.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.382
diff -u -r1.382 Makefile.am
--- Makefile.am 17 Jun 2004 23:43:09 -0000 1.382
+++ Makefile.am 24 Jun 2004 19:09:23 -0000
@@ -40,7 +40,7 @@
cond_gtk_ltlibrary =
endif
-toolexeclib_LTLIBRARIES = libgcj.la lib-org-xml-sax.la lib-org-w3c-dom.la \
+toolexeclib_LTLIBRARIES = libgcj.la libgij.la lib-org-xml-sax.la lib-org-w3c-dom.la \
$(cond_gtk_ltlibrary) $(cond_x_ltlibrary)
toolexecmainlib_DATA = libgcj.spec
@@ -152,6 +152,8 @@
$(built_java_source_files:.java=.lo)
x_javao_files = $(x_java_source_files:.java=.lo)
+libgij_la_SOURCES = gij.cc
+
libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
resolve.cc defineclass.cc interpret.cc verify.cc \
$(nat_source_files)