Hello Anton, While we have been discussing this, my partner discovered the source of where the sj/lj stuff is coming from. Does this mean that the LLVM libraries we're using are broken? Type.cpp ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x722): undefined reference to `__gxx_personality_sj0' ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x750): undefined reference to `_Unwind_SjLj_Register' ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x848): undefined reference to `_Unwind_SjLj_Resume' ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0xa31): undefined reference to `_Unwind_SjLj_Resume' Thanks, --Samuel Crow
Hello, Samuel> While we have been discussing this, my partner discovered the source of where the sj/lj stuff is coming from. Does this mean that the LLVM libraries we're using are broken? > > Type.cpp > ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x722): undefined reference to `__gxx_personality_sj0' > ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x750): undefined reference to `_Unwind_SjLj_Register' > ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0x848): undefined reference to `_Unwind_SjLj_Resume' > ..\..\..\..\llvm\lib/libLLVMCore.a(Type.cpp.obj):Type.cpp.text+0xa31): undefined reference to `_Unwind_SjLj_Resume'Ah, I've re-read the whole thread and now understand the whole situation: 1. You compiled llvm (on windows, as it seems to me) with the compiler which does sjlj-style EH (e.g. mingw's gcc 3.4.5) 2. LLVM supports only dwarf-based EH (however, EH on windows is currently unsupported), thus llvm-compiled libgcc does not contain any sjlj-related routines So, the best way to resolve the situation is: - Do not use EH in the code you're compiling via llvm-gcc (it won't work until someone will feel brave to implement missed EH bits on windows) - link everything with g++, not llvm-g++ Hope this will help. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Thanks Anton, We'll try it on Monday when he gets back to work. --Samuel ----- Original Message ----> From: Anton Korobeynikov <anton at korobeynikov.info> > To: Samuel Crow <samuraileumas at yahoo.com> > Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Sent: Fri, December 4, 2009 4:19:31 PM > Subject: Re: [LLVMdev] linking a parser bitcode >-snip-> Ah, I've re-read the whole thread and now understand the whole situation: > > 1. You compiled llvm (on windows, as it seems to me) with the compiler > which does sjlj-style EH (e.g. mingw's gcc 3.4.5) > 2. LLVM supports only dwarf-based EH (however, EH on windows is > currently unsupported), thus llvm-compiled libgcc does not contain any > sjlj-related routines > > So, the best way to resolve the situation is: > - Do not use EH in the code you're compiling via llvm-gcc (it won't > work until someone will feel brave to implement missed EH bits on > windows) > - link everything with g++, not llvm-g++ > > Hope this will help. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University