Alireza.Moshtaghi at microchip.com
2007-Jun-11 21:08 UTC
[LLVMdev] Getting started question.
Hi, I downloaded and installed the front-end (llvm-gcc 4), and downloaded, configured, and built llvm-2.0 using -prefix=[myllvmPath] and -with-llvmgccdir=[llvm-gccPath] When I try to use sparc as target, llvm-gcc does not recognize it. I used -march=sparc and it gives two errors: "bad value (sparc) for -march= switch" "bad value (sparc) for -mtune= switch" I used -bsparc as argument to llvm-gcc and it gives the following error: Llvm-gcc : couldn't run /blah/blah/llvm-gcc4.2.0-x86-linux-RHEL4/bin/sparc-gcc-4.0.1: No such file or directory What am I missing? I am doing this on Redhat Linux 2.4.21-37 Thanks Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070611/31e6786c/attachment.html>
On Mon, 11 Jun 2007 Alireza.Moshtaghi at microchip.com wrote:> I downloaded and installed the front-end (llvm-gcc 4), and downloaded, > configured, and built llvm-2.0 using -prefix=[myllvmPath] and > -with-llvmgccdir=[llvm-gccPath]ok> When I try to use sparc as target, llvm-gcc does not recognize it. I > used -march=sparc and it gives two errors:Unfortunately, llvm-gcc works like GCC, not like LLVM. As such, you have to hard code in the target to use in the binary. For llvm-gcc this means that you have to configure llvm-gcc itself as a cross compiler from your host linux box to your target sparc box. The standard GCC cross compiler options should work. Alternatively, if you want to get a taste of sparc code, you can do things like this: $ llvm-gcc x.c -O3 -c -o - -emit-llvm | llc -march=sparc However, this won't necessarily match the sparc ABIs, data layout, etc, so it is really only suitable for taste testing the sparc backend :) -Chris -- http://nondot.org/sabre/ http://llvm.org/
Reasonably Related Threads
- [LLVMdev] llvm/test: suffix or operands invalid for `push'
- [LLVMdev] llvm/test: suffix or operands invalid for `push'
- [LLVMdev] llvm/test: suffix or operands invalid for `push'
- [LLVMdev] llvm/test: suffix or operands invalid for `push'
- [LLVMdev] llvm/test: suffix or operands invalid for `push'