This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ 3.2 for Win32: Updated Snapshot
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 23:55:07 -0500 (EST)
- Subject: Re: GCJ 3.2 for Win32: Updated Snapshot
On 12 Dec 2002, Tom Tromey wrote:
> Jeff> That is what -fno-assume-compiled was for, as I understand it.
> Jeff> However it doesn't work at this time.
>
> I think it never worked.
I looked at the code. I think it can be useful; see the example below.
Would you be interested in patches to make it work?
[jsturm@suzy tmp]$ cat Foo.java
public class Foo extends Bar {
public Foo() {
System.out.println("Foo");
}
public static void main(String[] args) {
new Foo();
}
}
[jsturm@suzy tmp]$ cat Bar.java
public class Bar {
public Bar() {
System.out.println("Bar");
}
}
[jsturm@suzy tmp]$ gcj Foo.java --main=Foo -o foo
/tmp/ccCkQTOS.o(.text+0x1a): In function `Foo::Foo[in-charge]()':
: undefined reference to `Bar::Bar[in-charge]()'
/tmp/ccCkQTOS.o(.data+0x90): undefined reference to `Bar::class$'
collect2: ld returned 1 exit status
[jsturm@suzy tmp]$ gcj Foo.java -fno-assume-compiled --main=Foo -o foo
[jsturm@suzy tmp]$ ./foo
Exception in thread "main" java.lang.ClassNotFoundException: Bar
[jsturm@suzy tmp]$ gcj -C Bar.java
[jsturm@suzy tmp]$ ./foo
Bar
Foo