Prasanna Gautam
2010-Nov-18 03:55 UTC
[LLVMdev] LLVM new backend compiling/linking problem
Hi, I'm getting the following error when I'm trying to compile/link llvm with a backend I have. Running make on the /lib/M68K directory ends without any errors, and I have made all the required files and functions as outlined in http://llvm.org/releases/2.5/docs/WritingAnLLVMBackend.html I copied most of the files from Sparc backend and remove the content from functions mostly. Anyone has seen this error before? llvm[2]: Linking Release+Debug executable llc /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KTargetMachine.o): In function `~M68KTargetLowering': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KISelLowering.h:43: undefined reference to `vtable for llvm::M68KTargetLowering' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KTargetMachine.o): In function `~M68KGenRegisterInfo': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KGenRegisterInfo.h.inc:14: undefined reference to `vtable for llvm::M68KGenRegisterInfo' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KTargetMachine.o): In function `~M68KTargetLowering': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KISelLowering.h:43: undefined reference to `vtable for llvm::M68KTargetLowering' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KTargetMachine.o): In function `~M68KGenRegisterInfo': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KGenRegisterInfo.h.inc:14: undefined reference to `vtable for llvm::M68KGenRegisterInfo' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KISelLowering.o): In function `M68KTargetLowering': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KISelLowering.cpp:37: undefined reference to `vtable for llvm::M68KTargetLowering' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KISelLowering.o): In function `pair': /usr/include/c++/4.4/bits/stl_pair.h:84: undefined reference to `llvm::M68K::IntRegsRegClass' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KISelLowering.o): In function `M68KTargetLowering': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KISelLowering.cpp:37: undefined reference to `vtable for llvm::M68KTargetLowering' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KISelLowering.o): In function `pair': /usr/include/c++/4.4/bits/stl_pair.h:84: undefined reference to `llvm::M68K::IntRegsRegClass' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KInstrInfo.o): In function `M68KInstrInfo': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KInstrInfo.cpp:28: undefined reference to `llvm::M68KRegisterInfo::M68KRegisterInfo(llvm::M68KSubtarget&, llvm::TargetInstrInfo const&)' /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KInstrInfo.cpp:28: undefined reference to `llvm::M68KRegisterInfo::M68KRegisterInfo(llvm::M68KSubtarget&, llvm::TargetInstrInfo const&)' /home/pgautam/llvm/llvm-2.7/Release+Debug/lib/libLLVMM68KCodeGen.a(M68KInstrInfo.o): In function `~M68KGenRegisterInfo': /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KGenRegisterInfo.h.inc:14: undefined reference to `vtable for llvm::M68KGenRegisterInfo' /home/pgautam/llvm/llvm-2.7/lib/Target/M68K/M68KGenRegisterInfo.h.inc:14: undefined reference to `vtable for llvm::M68KGenRegisterInfo' collect2: ld returned 1 exit status - Prasanna Gautam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101117/b0bcce58/attachment.html>
NAKAMURA Takumi
2010-Nov-18 04:26 UTC
[LLVMdev] LLVM new backend compiling/linking problem
Good afternoon, Prasanna. M68k is interesting (to me)! 2010/11/18 Prasanna Gautam <prasannagautam at gmail.com>:> Hi, > I'm getting the following error when I'm trying to compile/link llvm with a > backend I have. Running make on the /lib/M68K directory ends without any > errors, and I have made all the required files and functions as outlined > in http://llvm.org/releases/2.5/docs/WritingAnLLVMBackend.html > I copied most of the files from Sparc backend and remove the content from > functions mostly. Anyone has seen this error before?Can lib/Target/M68K be compiled from top-level? I guess you are building on 2.7, but anyway, why do you refer to 2.5 docs? Does your tools/llvm-config/llvm-config.in have "M68K" in @TARGETS_BUILT? "tools" uses llvm-config to determine libraries. $ Release+Asserts/bin/llvm-config mblaze --libs -lLLVMMBlazeDisassembler -lLLVMMBlazeAsmParser -lLLVMMBlazeCodeGen (snip) -lLLVMSupport -lLLVMSystem You may seek and refer to initial commits about recent backends in svn tree. (eg. mblaze, nvptx) Cheers I loved m68k, ...Takumi