<br>Hi all,<br>with reference to the reply below, I downloaded toolchain from codesourcery
(arm-2009q1-203-arm-none-linux-gnueabi) with gcc 4.3.3... when i
compile llvm+clang with this toolchain i am getting the following error<br>
<br>
<span style="color: rgb(204, 0, 0);">make[4]: Entering directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/tools/clang/tools/c-index-test'</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">llvm[4]: Linking Release executable c-index-test (without symbols)</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">/home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/Release/bin/c-index-test:
hidden symbol `__sync_val_compare_and_swap_4' in
/home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o)
is referenced by DSO</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">/home/prasanth/arm-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
final link failed: Nonrepresentable section on output</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">collect2: ld returned 1 exit status</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[4]: *** [/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/Release/bin/c-index-test] Error 1</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[4]: Leaving directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/tools/clang/tools/c-index-test'</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[3]: *** [all] Error 1</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[3]: Leaving directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/tools/clang/tools'</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[2]: *** [all] Error 1</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[2]: Leaving directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/tools/clang'</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[1]: *** [clang/.makeall] Error 2</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make[1]: Leaving directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm-obj/tools'</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">make: *** [all] Error 1<br><br></span>
can anyone please tell me why am i getting this error and how can i resolve this?<br><br><span style="color: rgb(204, 0, 0);"><font color="#000000">Thanks and Regards,<br>Prasanth J</font></span><br><br><br><br><div class="gmail_quote">

On Mon, Nov 9, 2009 at 5:20 PM, Xerxes Rånby <span dir="ltr"><<a href="mailto:xerxes@zafena.se" target="_blank">xerxes@zafena.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Prasanth J skrev:<br>
> Hi,<br>
><br>
> i am a newbie to llvm architecture. i have been trying to port llvm on<br>
> ARM target. i am using the following configuration for cross compiling<br>
> llvm.<br>
><br>
> ../llvm/configure --host=arm-linux --target=arm-linux<br>
> --build=i686-linux --prefix=/opt/llvm-arm/ --enable-optimized<br>
> --disable-debug \<br>
>  --disable-expensive-checks --disable-doxygen \<br>
>  --disable-threads --enable-targets=cbe,cpp,arm<br>
><br>
> using this configuration i am facing the following compilation error.<br>
> pls help me how to resolve this error..<br>
><br>
> /make[1]: Entering directory<br>
> `/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System'<br>
> llvm[1]: Compiling Alarm.cpp for Release build<br>
> llvm[1]: Compiling Atomic.cpp for Release build<br>
> llvm[1]: Compiling Disassembler.cpp for Release build<br>
> llvm[1]: Compiling DynamicLibrary.cpp for Release build<br>
> llvm[1]: Compiling Errno.cpp for Release build<br>
> llvm[1]: Compiling Host.cpp for Release build<br>
> llvm[1]: Compiling IncludeFile.cpp for Release build<br>
> llvm[1]: Compiling Memory.cpp for Release build<br>
> /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp: In<br>
> static member function ‘static void<br>
> llvm::sys::Memory::InvalidateInstructionCache(const void*, size_t)’:<br>
> /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp:67:<br>
> error: ‘__clear_cache’ was not declared in this scope<br>
> make[1]: ***<br>
> [/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System/Release/Memory.o]<br>
> Error 1<br>
> make[1]: Leaving directory<br>
> `/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System'<br>
> make: *** [all] Error 1//<br>
><br>
> /i can able to compile by commenting the line in Memory.cpp but i am<br>
> not sure whether it will affect anything while running llvm on target.<br>
> After cross-compilation i copied the binaries to target and i tried to<br>
> compile and run a simple helloworld.c application. As clang requires a<br>
> working gcc on target i used to "-ccc-clang-archs" options to skip the<br>
> need for gcc on target. But still i am getting the following error.<br>
<br>
By commenting out that line will make your llvm version crash<br>
sporadically since you would recreate llvm PR4960 if using the llvm JIT.<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=4960" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=4960</a><br>
<br>
__clear_cache are needed to clear the instructioncache after jitting a<br>
function and this gcc builtin are found in gcc 4.3.3 and later or<br>
CodeSourcery's 2007Q3/2008Q1 compiler releases and later.<br>
<br>
Try updating you cross compiler!<br></blockquote><div><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Cheers<br>
<font color="#888888">Xerxes<br>
</font></blockquote></div><br>