This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/17831] New: GCJ/CNI should be usable without 'gcjh'
- From: "csm at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 4 Oct 2004 23:36:51 -0000
- Subject: [Bug java/17831] New: GCJ/CNI should be usable without 'gcjh'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A nice enhancement to GCJ would be to remove the need to invoke 'gcjh' on
compliled classes before compiling CNI C++ source. Extending this to JNI code
would be nice, too, but potentially harder.
That is, the following command line should work:
$ gcj -shared -o lib-foo.so foo.java foo.cc
Or, even this exact sequence:
$ gcj -c -o foo.o foo.java
$ gcj -c -o foo-cni.o foo.cc
$ gcj -shared -o lib-foo.so foo.o foo-cni.o
In theory this should be possible, since everything you need to compile to
'lib-foo.so' is present in those two files. But in practice, of course, this
touches potentially everything from g++ to cpp, and becomes pretty hairy indeed.
Maybe a good way to do this would be to extend cpp so front-ends can register
hooks to the include-lookups, so gcj could, for example, intercept certain
#includes to produce CNI headers on-the-fly.
Also, gcj/gcjh should be able to generate CNI/JNI headers from java source. gcjx
can (will be able to) do this, for example.
--
Summary: GCJ/CNI should be usable without 'gcjh'
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: csm at gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17831