[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 at zafena.se
Mon Nov 16 08:48:08 CST 2009
Prasanth J wrote:
> 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
> 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
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):
More information about the LLVMdev