-
-
Save vishwassharma/5075897 to your computer and use it in GitHub Desktop.
LLVM/Clang now builds for Cortex-M3?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd llvm | |
| git clone http://llvm.org/git/llvm.git | |
| cd llvm/tools | |
| git clone http://llvm.org/git/clang.git | |
| cd llvm/projects | |
| git clone http://llvm.org/git/compiler-rt.git | |
| cd ../llvm-build/ | |
| ../llvm/configure --prefix=$(HOME)/bin/llvm | |
| --exec-prefix=$(HOME)/bin/llvm --enable-targets=x86_64,arm,cpp | |
| --enable-optimized | |
| make | |
| make install | |
| clang -v | |
| clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple | |
| thumbv7m-none-gnueabi testReference.cpp -c | |
| It seems like it worked. | |
| $ arm-none-linux-gnueabi-objdump -D --section=.text testReference.o | |
| testReference.o: file format elf32-littlearm | |
| Disassembly of section .text: | |
| 00000000 <main>: | |
| 0: e92d4800 push {fp, lr} | |
| 4: e1a0b00d mov fp, sp | |
| 8: e24dd030 sub sp, sp, #48 ; 0x30 | |
| https://gist.github.com/jsnyder/1108326 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment