[LLVMdev] LLVM new backend compiling/linking problem

Prasanna Gautam prasannagautam at gmail.com
Wed Nov 17 19:55:06 PST 2010


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>


More information about the llvm-dev mailing list