<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - Error when linking lib/libLLVMX86CodeGen.a on Linux with GCC_INSTALL_PREFIX set in a second stage compilation" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24296&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=ZkYFbTissZ24polY7o86Rob3X6w8OtNW3WrKecnAu3w&s=j2xiqKJaCUGr9vhY0ejeofGAGzvoSLKoHbskX_PL_X4&e=">24296</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error when linking lib/libLLVMX86CodeGen.a on Linux with GCC_INSTALL_PREFIX set in a second stage compilation
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ehsan@mozilla.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, rafael.espindola@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I am trying to do a three stage compiler built for an environment which wants
to set the gcc toolchain to a specific directory. Before I was using the
autoconf build system and everything was working fine when I was using
—with-gcc-toolchain=/tools/gcc-4.7.3-0moz1 and everything was working fine.
Now I have switched to using CMake and now I’m using
-DGCC_INSTALL_PREFIX=/tools/gcc-4.7.3-0moz1 and my second stage build fails
with an error like this:
FAILED: : && /builds/slave/moz-toolchain/build/stage2/clang/bin/clang++
-static-libgcc -static-libstdc++ -fPIC -fvisibility-inlines-hidden -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wnon-virtual-dtor -Wno-comment -std=c++11
-fcolor-diagnostics -Wall -std=c++11 -Wl,-z,defs -Wl,-O3 -Wl,--gc-sections
-Wl,--version-script,/media/storage/builds/slave/moz-toolchain/build/stage3/build/tools/lto/LTO.exports
-shared -Wl,-soname,libLTO.so.3.7 -o lib/libLTO.so.3.7.0svn
tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o
tools/lto/CMakeFiles/LTO.dir/lto.cpp.o lib/libLLVMX86CodeGen.a
lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a
lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMARMCodeGen.a
lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a
lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMCore.a
lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCDisassembler.a
lib/libLLVMSupport.a lib/libLLVMTarget.a lib/libLLVMX86CodeGen.a
lib/libLLVMX86Desc.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a
lib/libLLVMX86Info.a lib/libLLVMAsmPrinter.a lib/libLLVMSelectionDAG.a
lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a
lib/libLLVMMCDisassembler.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a
lib/libLLVMInstrumentation.a lib/libLLVMBitWriter.a lib/libLLVMLinker.a
lib/libLLVMObjCARCOpts.a lib/libLLVMipo.a lib/libLLVMScalarOpts.a
lib/libLLVMProfileData.a lib/libLLVMObject.a lib/libLLVMMCParser.a
lib/libLLVMMC.a lib/libLLVMBitReader.a lib/libLLVMInstCombine.a
lib/libLLVMVectorize.a lib/libLLVMTransformUtils.a lib/libLLVMipa.a
lib/libLLVMAnalysis.a lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -ltinfo
-lpthread -lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :
/usr/bin/ld.bfd.real: lib/libLLVMX86CodeGen.a(X86AsmPrinter.cpp.o): relocation
R_X86_64_32S against `.rodata' can not be used when making a shared object;
recompile with -fPIC
lib/libLLVMX86CodeGen.a: error adding symbols: Bad value
clang-3.7: error: linker command failed with exit code 1 (use -v to see
invocation)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>