bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AM_PROG_GCJ fails at `make' if nothing else defines OBJEXT


From: Jack Kelly
Subject: Re: AM_PROG_GCJ fails at `make' if nothing else defines OBJEXT
Date: Mon, 25 May 2009 08:17:46 +1000

On Mon, May 25, 2009 at 12:42 AM, Ralf Wildenhues
<address@hidden> wrote:
> Hi Jack,
>
> * Jack Kelly wrote on Wed, May 13, 2009 at 01:24:40PM CEST:
>> I've found that if nothing else defines OBJEXT, AM_PROG_GCJ won't do
>> it and then make will fail with an error like:
>>
>>   make: *** No rule to make target `Test.', needed by `test'.  Stop.
>
> Thank you for the bug report and example test.  I agree that it is a
> bug, but I think fixing it will require at least some Autoconf support.
> Maybe we should start thinking of moving AM_PROG_GCJ into the Autoconf
> language framework.  BTW, EXEEXT needs a definition, too.

Thanks for doing that, Ralf. I've given up on playing with GCJ for the
moment, but here are some other things that I've noticed:

1. AM_PROG_GCJ might want to think about using AC_CHECK_TOOLS instead
of AC_CHECK_PROGS - to catch a cross-compiled gcj that's building
binaries for a different host.

2. The suffix mechanism might not be quite enough for Java projects
with native methods using the C++ interface. For these, it appears
that gcj wants something like this (my best guess here, docs are quite
sketchy):

Suppose Foo.cc contains the implementation of the native methods
declared in Foo.java. Then to compile, the following is needed:

# Make Foo.class
gcj -C Foo.java
# Make Foo.h, which is #include'd by Foo.cc
gcjh Foo.class
g++ -c -o Foo.o Foo.cc
gcj -o Foo.class.o Foo.class
# Or instead of the above:
gcj -c -o Foo.class.o Foo.java

Then link to taste, using gcj to call the linker.

-- Jack




reply via email to

[Prev in Thread] Current Thread [Next in Thread]