[LLVMbugs] [Bug 13632] New: Missing lib dependence between libTarget and libCodeGen at -O0
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 17 14:37:50 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13632
Bug #: 13632
Summary: Missing lib dependence between libTarget and
libCodeGen at -O0
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: spop at codeaurora.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
There is a missing dependence between libLLVMTarget.so and libLLVMCodeGen.so
when compiling llvm with gcc-4.7.1 or gcc-4.6.1 at -O0:
# cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -D LLVM_ENABLE_PIC:BOOL=OFF -D
CMAKE_INSTALL_PREFIX:PATH=~/s/tip/x86-usr/ -D LLVM_ENABLE_ASSERTIONS:BOOL=ON -D
LLVM_ENABLE_WARNINGS:BOOL=ON -D CMAKE_CXX_FLAGS:STRING="-O0 -g" ..
# ninja
FAILED: : && /usr/bin/c++ -O0 -g -fno-rtti -fPIC
tools/llvm-dis/CMakeFiles/llvm-dis.dir/llvm-dis.cpp.o -o bin/llvm-dis
-rdynamic lib/libLLVMBitReader.so lib/libLLVMAnalysis.so lib/libLLVMTarget.so
lib/libLLVMCore.so lib/libLLVMMC.so lib/libLLVMObject.so lib/libLLVMSupport.so
-ldl -lpthread -Wl,-rpath,/usr2/spop/s/tip/x86-ninja/lib: && :
lib/libLLVMTarget.so: undefined reference to
`llvm::MachineInstr::hasPropertyInBundle(unsigned int,
llvm::MachineInstr::QueryType) const'
collect2: error: ld returned 1 exit status
This passes when compiled at -O1 and above.
At -O0 gcc does not inline hasPropertyInBundle and leaves unresolved calls to
this function in libTarget.
Adding CodeGen to the libs dependences in lib/Target/LLVMBuild.txt:
required_libraries = Core MC Support CodeGen
does not work as this creates circular dependences between these libs:
CMake Error at CMakeLists.txt:335 (message):
Unexpected failure executing llvm-build: llvm-build: fatal error: found
cycle to 'Target' after following: 'X86Info' (required library) -> 'Target'
(required library) -> 'CodeGen' (required library) -> 'Analysis' (required
library) -> Target
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list