[Mesa-dev] [Bug 61366] New: oprofilejit should be included in the list of LLVM components required
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Feb 23 12:13:05 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=61366
Priority: medium
Bug ID: 61366
Assignee: mesa-dev at lists.freedesktop.org
Summary: oprofilejit should be included in the list of LLVM
components required
Severity: minor
Classification: Unclassified
OS: Linux (All)
Reporter: ats-fd at offog.org
Hardware: x86-64 (AMD64)
Status: NEW
Version: 9.0
Component: Other
Product: Mesa
Created attachment 75423
--> https://bugs.freedesktop.org/attachment.cgi?id=75423&action=edit
My patch
I'm using Mesa 9.0.3 on Linux, built with automake.
llvmpipe uses llvm::JITEventListener::createOProfileJITEventListener if LLVM
was compiled with OProfile support, so it needs to link with
libLLVMOProfileJIT -- i.e. include oprofilejit in the list of LLVM components
required in configure.ac, if it exists.
There's already a similar test for mcjit; duplicating this for oprofilejit
works for me. Patch to this effect attached, but you may prefer a different
fix.
Without this, I get the following link error:
gmake[5]: Entering directory
`/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe'
g++ -Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed
-L/gar/packages/llvm-3.2/lib -lbfd -lpthread -ldl -lm -lopagent
-L/gar/lib/oprofile -Wl,-rpath,/gar/lib/oprofile lp_test_format.o
lp_test_main.o -o lp_test_format -Wl,--start-group -L../../auxiliary/
-lgallium libllvmpipe.a -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86Disassembler
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser
-lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils
-lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa
-lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
-L/gar/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm
-L/gar/lib -ldrm -lm -lpthread -ldl -Wl,--end-group
../../auxiliary//libgallium.a(lp_bld_misc.o): In function
`lp_register_oprofile_jit_event_listener':
lp_bld_misc.cpp:(.text+0x1c): undefined reference to
`llvm::JITEventListener::createOProfileJITEventListener()'
collect2: error: ld returned 1 exit status
gmake[5]: *** [lp_test_format] Error 1
gmake[5]: Leaving directory
`/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe'
I guess this error doesn't show up for people who've got LLVM built as one
large library, which isn't the default configuration.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130223/ebf52719/attachment.html>
More information about the mesa-dev
mailing list