[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.

Prasanth J j.prasanth.j at gmail.com
Mon Nov 16 21:30:53 PST 2009


> Prasanth J wrote:
> > Hi,
> >
> > I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..)..
> > but when i tried to run it on target it shows GCC 4.3.0 version not
> > found. So i copied the runtime libraries (libc.so and libgcc_s.so)
> > from the toolchain to the target and exported its path in
> > LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its
> > crashing with Segmentation fault. What could be the problem for this.
> Impossible to know without debugging. whats the backtrace when running
> the program from inside the gnu debugger gdb?
> and what tools did you run.
>
> What command did you run that caused the crash?
>
> What are the output from
> llc -version
> and
> lli -version
> ?
>
>

when i tried to run this command (lli -version)i got the following error

../../llvm-with-gcc433/bin/lli: /lib/libstdc++.so.6: version
`CXXABI_ARM_1.3.3' not found (required by ../../llvm-with-gcc433/bin/lli)
../../llvm-with-gcc433/bin/lli: /lib/libgcc_s.so.1: version `GCC_4.3.0' not
found (required by ../../llvm-with-gcc433/bin/lli)

so i exported the path to libstdc++ and libgcc_s in LD_LIBRARY_PATH. after
exporting when i tried to run lli ( or any llvm tools) i am getting a crash
saying Segmentation fault.

i could not post the backtrace as even running gdb creates a crash.



> >
> > My target kernel and rootfs are compiled with armgcc-4.2.1... so
> > should i need to compile the kernel and rootfs with armgcc-4.3.3?
> Probably not needed.
> >
> > If i want to use arm-toolchain-4.2.1 , what should i do for clearing
> > the instruction cache call in lib/System/Memory.cpp?
> You have to implement it using inline assembler for GCC 4.2.1 and below
> to work.
> You can check the gcc sources to see how __clear_cache got implemeted in
> gcc 4.3.3 or check the arm reference manual (ARM ARM):
> http://www.arm.com/miscPDFs/14128.pdf
>
> Cheers
> Xerxes
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091117/d25e6d36/attachment.html>


More information about the llvm-dev mailing list