With a static gcj build, target=i686-pc-linux, using -findirect-dispatch to compile a class will result in this compilation error: /tmp/cciWx2S5.o: In function `main':ccxsXCuN.i:(.text+0x13): undefined reference to `_Jv_Compiler_Properties' :ccxsXCuN.i:(.text+0x30): undefined reference to `JvRunMainName' /tmp/ccmjyQHx.o: In function `void Test::main(JArray<java::lang::String*>*)':Test.class:(.text+0x2e): undefined reference to `_Jv_InitClass' :Test.class:(.text+0x51): undefined reference to `_Jv_ResolvePoolEntry' /tmp/ccmjyQHx.o: In function `global constructors keyed to 0__ZN4TestC1Ev':Test.class:(.text+0xb6): undefined reference to `_Jv_RegisterNewClasses' /tmp/ccmjyQHx.o:(.eh_frame+0x11): undefined reference to `__gcj_personality_v0' collect2: ld returned 1 exit status Seen with a host=mingw and host=linux GCJ. This worked with GCJ 4.2. Workaround: The problem probably lies in libgcj.spec. In my host=linux and target=linux libgcj.spec, I have: *lib: %{static-libgcj:-non_shared} %{s-bc-abi:-lgcj_bc;:-lgcj} %{static-libgcj:-call_shared} -lm -lpthread -lrt -ldl %(libgcc) %(liborig) Replacing it with: *lib: %{s-bc-abi:} -lgcj -lm -lpthread -lrt -ldl %(libgcc) %(liborig) Will make the compilation work again.
This also breaks the build when a static built GCJ is taken for the compilation of ecj.jar (because it's compiled with -findirect-dispatch).
Actually static builds of libgcj are pretty much broken with a valid ABI :).
What do you mean with this? What doesn't work? Is this something recent? At least rev 122'233 seemed ok to me...
GCJ has been removed from the trunk so I doubt this will be fixed so closing as such.