This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Proposal: make gcjh default to JNI mode
On Thu, 2005-04-28 at 18:46 +0100, Andrew Haley wrote:
> Thomas Fitzsimmons writes:
> > On Thu, 2005-04-28 at 12:09 -0400, Bryce McKinlay wrote:
> > > Andrew Haley wrote:
> > >
> > > >Thomas Fitzsimmons writes:
> > > > > > Currently gcjh defaults to emitting CNI headers. I propose we change it
> > > > > > to emit JNI headers by default. That way gcjh will become command-line
> > > > > > compatible with javah. This would allow me to remove the javah wrapper
> > > > > > script from java-gcj-compat and instead symlink javah directly to gcjh.
> > > > >
> > > > > I should have mentioned; I'm proposing this change for mainline (4.1),
> > > > > not 4.0.x.
> > > >
> > > >I think this is an awful idea. CNI is our preferred route and offers
> > > >many advantages. To change gcjh to emitting JNI headers by default
> > > >would send out an inapporpriate message. If you would like gcjh to
> > > >look at its argv[0] and do something different when invoked as javah I
> > > >wouldn't object.
> > > >
> > > I agree. Despite the fact that "downgrading" CNI is not the direction we
> > > want to take, dramatically changing the behavior of an existing tool is
> > > a no-no and would contradict/break all the documentation, FAQs,
> > > Makefiles etc that are out there.
> >
> > That's why I'm proposing it for 4.1. I really don't like the idea that
> > gcjh is command-line incompatible with javah just for the sake of
> > promoting CNI. That said, the mistake has already been made; if people
> > think it's too big a break for a point release then we'll just have to
> > live with the current situation for now.
>
> It's too big a break for any release, ever.
>
> > > On the other hand, using JNI by default if invoked as "javac"
> > > seems like a great idea!
> >
> > I'd rather create a separate tool then, maybe called "gcjhjni". I don't
> > like the idea that:
> >
> > /usr/bin/javah -> /usr/bin/gcjh
> >
> > and running "javah" gives different behaviour from running "gcjh". It's
> > too confusing.
>
> Fair enough. It's a time hallowed UNIX tradition to do this sort of
> thing, but I can see it might be confuxing. I think it's kinda
> elegant myself. :-)
>
> > We can't just call the separate tool "javah" because that will conflict
> > with proprietary versions of "javah". For example, we had problems when
> > fastjar was installed as /usr/bin/jar. So I propose calling it
> > "gcjhjni" and installing it in $prefix/bin alongside gcjh. Then I can
> > create a direct symlink from javah -> gcjhjni in java-gcj-compat.
>
> I hate that name. gnujavah is surely better, but any pronouncable
> name is OK with me.
>
Since we don't like having "java" in our names, and since Andrew and I
proposed "gjnih" simultaneously on IRC, we'll go with "gjnih" unless
anyone objects.
Tom