I was able to use your scripts to build� llvm and llvm-gcc successfully. But when i try to link to llvm libraries i get the following : ......................... .......................... /arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: /arm-llvm/llvm-project/i686-pc-linux-gnu/arm-none-linux-gnueabi/llvm/lib/LLVMXCore.o: Relocations in generic ELF (EM: 3) /arm-llvm/llvm-project/i686-pc-linux-gnu/arm-none-linux-gnueabi/llvm/lib/LLVMXCore.o: could not read symbols: File in wrong format Thanks Hannibal ----- Original Message ----- From: "Misha Brukman" To: "LLVM Developers Mailing List" Subject: Re: [LLVMdev] CROSS COMPILING LLVM Date: Thu, 11 Jun 2009 22:18:25 -0400 I've committed my scripts that simplify building Linux/x86 -> Linux/ARM crosstool.� There are 2 parts to using this: * llvm/utils/crosstool/create-snapshots.sh � creates tarballs for LLVM and LLVM-GCC from HEAD SVN or a specific revision of your choice * llvm/utils/crosstool/ARM/build-install-linux.sh � builds and installs a Linux/x86 -> Linux/ARM crosstool using the snapshots generated by the above script.� It also uses the CodeSourcery GCC-based cross toolchain to avoid having to rebuild cross-binutils and glibc, but if you don't have it, it'll tell you where to download it from. Note that HEAD revision of SVN doesn't work for me, but I listed the latest one I've tried that does, which is 70786. Let me know if this approach works for you. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090614/0c550056/attachment.html>
2009/6/14 hannibal hannibal <hannibal_08 at mail.com>> I was able to use your scripts to build llvm and llvm-gcc successfully. > But when i try to link to llvm libraries i get the following : > > ......................... > .......................... > /arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: > /arm-llvm/llvm-project/i686-pc-linux-gnu/arm-none-linux-gnueabi/llvm/lib/LLVMXCore.o: > Relocations in generic ELF (EM: 3) > /arm-llvm/llvm-project/i686-pc-linux-gnu/arm-none-linux-gnueabi/llvm/lib/LLVMXCore.o: > could not read symbols: File in wrong format >What are you trying to do, exactly? If you're trying to create an ARM executable which uses LLVM libraries, note that you'd have to also cross-compile LLVM first, using your new cross-compiler. Otherwise, you're trying to link ARM object files with x86_64 LLVM libraries, which aren't compatible. Note that I'm just guessing -- it's really hard to tell what's wrong without complete information, e.g. exact command lines, your host machine, your target machine, etc. Misha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090615/d8ae7786/attachment.html>