[cfe-dev] How to compile Clang for ARM Linux on x86_64 Linux?
Anton Smirnov
dev at antonsmirnov.name
Wed Oct 2 01:00:40 PDT 2013
Thanks a lot, Renato!
Is it clang compiler issue or configure script issue? How can i fix it for
now?
2013/10/2 Renato Golin <renato.golin at linaro.org>
> Sorry Anton,
>
> By rebuilding it again, I hit a similar bug while linking llvm-tblgen (for
> ARM):
>
> FAILED: : && /home/rengolin/devel/llvm/install/bin/clang++ -target
> armv7a-linux-gnueabihf -mcpu=cortex-a9
> -I/usr/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/
> -I/usr/arm-linux-gnueabihf/include/ -mfloat-abi=hard -ccc-gcc-name
> arm-linux-gnueabihf-gcc -I/home/rengolin/devel/llvm/arm/root/usr/include
> -Wno-c99-extensions -Wall -W -Wno-unused-parameter -Wwrite-strings
> -Wmissing-field-initializers -pedantic -Wno-long-long
> -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti
> -O3 -DNDEBUG
> -L/home/rengolin/devel/llvm/arm/root/usr/lib/arm-linux-gnueabihf
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterInst.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CallingConvEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeEmitterGen.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenInstruction.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenMapTable.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenRegisters.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenSchedule.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenTarget.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherGen.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcher.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/DisassemblerEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/FastISelEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/SetTheory.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/TGValueTypes.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o
> utils/TableGen/CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o -o
> bin/llvm-tblgen -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/lib64
> lib/libLLVMTableGen.a lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz
> -lpthread -lz && :
>
> lib/libLLVMSupport.a: could not read symbols: File format not recognised
>
> Note the " -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/lib64" arguments that
> should not have been there.
>
> I'm not sure why Clang is adding them, but this is clearly wrong, and may
> be the reason why clang believes the symbols are not recognized.
>
> cheers,
> --renato
>
>
>
>
> On 2 October 2013 06:26, Anton Smirnov <dev at antonsmirnov.name> wrote:
>
>> Anyone?
>>
>>
>> 2013/9/30 Anton Smirnov <dev at antonsmirnov.name>
>>
>>> I've tried to make using cmake & ninja from scratch - the same linking
>>> error. Both configurations (host and target) were done with
>>> -DLLVM_ENABLE_PIC=False flag.
>>>
>>> What can i do? Can some one compile it in his dev environment please?
>>>
>>>
>>> 2013/9/30 Renato Golin <renato.golin at linaro.org>
>>>
>>>> On 30 September 2013 08:23, Tim Northover <t.p.northover at gmail.com>wrote:
>>>>
>>>>> > I don't remember the particular manifestation, but it might be what's
>>>>> > causing your problem.
>>>>>
>>>>> Do you remember if there was a bug report about it?
>>>>> R_ARM_THM_MOVW_ABS_NC didn't turn anything up in bugzilla.
>>>>>
>>>>
>>>> Hum.... I remember "wanting to create a bug", and even putting it down
>>>> on my TODO list, but I don't remember if I actually did it. :(
>>>>
>>>> I'll try to reproduce it again and will report.
>>>>
>>>> cheers,
>>>> --renato
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131002/7a69dfdd/attachment.html>
More information about the cfe-dev
mailing list