[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.

Xerxes RĂ„nby xerxes at zafena.se
Mon Nov 16 06:48:08 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
?

>
> 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





More information about the llvm-dev mailing list