[Bug java/31223] New: [regression] indirect dispatch not working with static builds
mtrudel at gmx dot ch
gcc-bugzilla@gcc.gnu.org
Fri Mar 16 12:55:00 GMT 2007
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.
--
Summary: [regression] indirect dispatch not working with static
builds
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mtrudel at gmx dot ch
GCC target triplet: i686-pc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31223
More information about the Gcc-bugs
mailing list