[LLVMdev] llvm-mc build fails

John Myers atomicdog.jwm at gmail.com
Sun Nov 1 22:57:18 PST 2009


Hi,

I'm looking for some pointers on how to troubleshoot this problem. I'm
trying to write a backend for the AVR.
There is an undefined reference at line 48 which is the line FrameInfo() is
on. I've tried to use the MSP430 and other targets as references so I'm not
sure
what changes I did would cause a problem on this line?


AVRTargetMachine::AVRTargetMachine(const Target &T, const std::string &TT,
                                       const std::string &FS)
  : LLVMTargetMachine(T, TT),
    Subtarget(TT, FS),
    DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"),
    InstrInfo(Subtarget),
    TLInfo(*this),
    FrameInfo(TargetFrameInfo::StackGrowsDown, 1, 0) { }



Linking CXX executable
../../bin/llvm-mc

cd /home/john/src/llvm_build/tools/llvm-mc && /usr/bin/cmake -E
cmake_link_script CMakeFiles/llvm-mc.dir/link.txt
--verbose=1
/usr/bin/c++   -g  -fPIC CMakeFiles/llvm-mc.dir/llvm-mc.cpp.o
CMakeFiles/llvm-mc.dir/AsmExpr.cpp.o CMakeFiles/llvm-mc.dir/AsmLexer.cpp.o
CMakeFiles/llvm-mc.dir/AsmParser.cpp.o  -o ../../bin/llvm-mc -rdynamic
../../lib/libLLVMAVRCodeGen.a ../../lib/libLLVMAVRAsmPrinter.a
../../lib/libLLVMAVRInfo.a ../../lib/libLLVMMC.a ../../lib/libLLVMSupport.a
../../lib/libLLVMSystem.a -ldl ../../lib/libLLVMSelectionDAG.a
../../lib/libLLVMAnalysis.a ../../lib/libLLVMAsmPrinter.a
../../lib/libLLVMCodeGen.a ../../lib/libLLVMCore.a
../../lib/libLLVMScalarOpts.a ../../lib/libLLVMTransformUtils.a
../../lib/libLLVMSupport.a
../../lib/libLLVMSystem.a

../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`AVRTargetMachine':

/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.cpp:48: undefined
reference to
`llvm::TargetData::~TargetData()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.cpp:48: undefined
reference to
`llvm::TargetData::~TargetData()'
../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`TargetFrameInfo':

/home/john/src/llvm2.6/include/llvm/Target/TargetFrameInfo.h:40: undefined
reference to `vtable for
llvm::TargetFrameInfo'
../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`~AVRGenRegisterInfo':

/home/john/src/llvm_build/lib/Target/AVR/AVRGenRegisterInfo.h.inc:14:
undefined reference to
`llvm::TargetRegisterInfo::~TargetRegisterInfo()'
../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`~TargetInstrInfoImpl':

/home/john/src/llvm2.6/include/llvm/Target/TargetInstrInfo.h:474: undefined
reference to
`llvm::TargetInstrInfo::~TargetInstrInfo()'
../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`~AVRSubtarget':

/home/john/src/llvm2.6/lib/Target/AVR/AVRSubtarget.h:24: undefined reference
to
`llvm::TargetSubtarget::~TargetSubtarget()'

/home/john/src/llvm2.6/lib/Target/AVR/AVRSubtarget.h:24: undefined reference
to
`llvm::TargetSubtarget::~TargetSubtarget()'

../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`~LLVMTargetMachine':

/home/john/src/llvm2.6/include/llvm/Target/TargetMachine.h:285: undefined
reference to
`llvm::TargetMachine::~TargetMachine()'
../../lib/libLLVMAVRCodeGen.a(AVRTargetMachine.cpp.o): In function
`~AVRTargetMachine':

/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to
`llvm::TargetFrameInfo::~TargetFrameInfo()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to
`llvm::TargetData::~TargetData()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to
`llvm::TargetData::~TargetData()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to
`llvm::TargetFrameInfo::~TargetFrameInfo()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to
`llvm::TargetData::~TargetData()'
/home/john/src/llvm2.6/lib/Target/AVR/AVRTargetMachine.h:31: undefined
reference to `llvm::TargetData::~TargetData()'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091101/090a0b87/attachment.html>


More information about the llvm-dev mailing list