[LLVMbugs] [Bug 24296] New: Error when linking lib/libLLVMX86CodeGen.a on Linux with GCC_INSTALL_PREFIX set in a second stage compilation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 29 05:28:45 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24296

            Bug ID: 24296
           Summary: Error when linking lib/libLLVMX86CodeGen.a on Linux
                    with GCC_INSTALL_PREFIX set in a second stage
                    compilation
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: ehsan at mozilla.com
                CC: llvmbugs at cs.uiuc.edu, rafael.espindola at gmail.com
    Classification: Unclassified

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150729/d8204242/attachment.html>


More information about the llvm-bugs mailing list