Scott Shawcroft via llvm-dev
2017-Apr-30 22:18 UTC
[llvm-dev] Help with setting up ARM embedded clang + lld
Hi all, I've been doing a ton of embedded work (bare metal ARM Cortex M0+ and M4, hopefully RISCV in the future) in the last year and would love to start using and hacking on the llvm toolchain. I've tried setting up clang + lld but can't get lld to work because clang tries to launch gcc. I realize support is early but I'd love to have a dev setup so I can help fix things. Could some help me setup my Makefiles in this project: https://github.com/tannewt/circuitpython/tree/clang to use dev builds of clang and lld? Thanks! ~Scott
Rui Ueyama via llvm-dev
2017-Apr-30 22:28 UTC
[llvm-dev] Help with setting up ARM embedded clang + lld
Did you read http://lld.llvm.org/#using-lld? In short, you want to pass -use-ld=lld to clang to use ld.lld instead of ld. On Sun, Apr 30, 2017 at 3:18 PM, Scott Shawcroft via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi all, > I've been doing a ton of embedded work (bare metal ARM Cortex M0+ and > M4, hopefully RISCV in the future) in the last year and would love to > start using and hacking on the llvm toolchain. I've tried setting up > clang + lld but can't get lld to work because clang tries to launch gcc. > I realize support is early but I'd love to have a dev setup so I can > help fix things. > > Could some help me setup my Makefiles in this project: > https://github.com/tannewt/circuitpython/tree/clang to use dev builds of > clang and lld? Thanks! > ~Scott > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170430/b204be20/attachment.html>
Joerg Sonnenberger via llvm-dev
2017-Apr-30 22:32 UTC
[llvm-dev] Help with setting up ARM embedded clang + lld
On Sun, Apr 30, 2017 at 03:18:35PM -0700, Scott Shawcroft via llvm-dev wrote:> Hi all, > I've been doing a ton of embedded work (bare metal ARM Cortex M0+ and > M4, hopefully RISCV in the future) in the last year and would love to > start using and hacking on the llvm toolchain. I've tried setting up > clang + lld but can't get lld to work because clang tries to launch gcc. > I realize support is early but I'd love to have a dev setup so I can > help fix things.clang doesn't know how to call a linker for baremetal, so it tries to fallback to gcc. Just call the linker directly. Joerg
Scott Shawcroft via llvm-dev
2017-Apr-30 22:33 UTC
[llvm-dev] Help with setting up ARM embedded clang + lld
I did look at that and it doesn't work. Here is the line from the Makefile: https://github.com/tannewt/circuitpython/blob/clang/atmel-samd/Makefile#L300 And here is it as output from make: clang version 5.0.0 (trunk 301735) Target: armv6m-none--eabi Thread model: posix InstalledDir: /Users/tannewt/repos/llvm/build/bin "gcc" -flto -v -fuse-ld=lld -march=thumb... clang-5.0: error: unable to execute command: Executable "gcc" doesn't exist!clang-5.0: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) On Sun, Apr 30, 2017, at 03:28 PM, Rui Ueyama wrote:> Did you read http://lld.llvm.org/#using-lld? In short, you want to > pass -use-ld=lld to clang to use ld.lld instead of ld.> > On Sun, Apr 30, 2017 at 3:18 PM, Scott Shawcroft via llvm-dev <llvm- > dev at lists.llvm.org> wrote:>> Hi all, >> I've been doing a ton of embedded work (bare metal ARM Cortex M0+ and>> M4, hopefully RISCV in the future) in the last year and would love to>> start using and hacking on the llvm toolchain. I've tried setting up>> clang + lld but can't get lld to work because clang tries to >> launch gcc.>> I realize support is early but I'd love to have a dev setup so I can>> help fix things. >> >> Could some help me setup my Makefiles in this project: >> https://github.com/tannewt/circuitpython/tree/clang to use dev >> builds of>> clang and lld? Thanks! >> ~Scott >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170430/9e8bde45/attachment.html>
Scott Shawcroft via llvm-dev
2017-Apr-30 22:47 UTC
[llvm-dev] Help with setting up ARM embedded clang + lld
Ok, thanks! I got it going that way. I'd still love to hear from anyone off list working on similar stuff. ~Scott On Sun, Apr 30, 2017, at 03:32 PM, Joerg Sonnenberger wrote:> On Sun, Apr 30, 2017 at 03:18:35PM -0700, Scott Shawcroft via llvm-dev > wrote: > > Hi all, > > I've been doing a ton of embedded work (bare metal ARM Cortex M0+ and > > M4, hopefully RISCV in the future) in the last year and would love to > > start using and hacking on the llvm toolchain. I've tried setting up > > clang + lld but can't get lld to work because clang tries to launch gcc. > > I realize support is early but I'd love to have a dev setup so I can > > help fix things. > > clang doesn't know how to call a linker for baremetal, so it tries to > fallback to gcc. Just call the linker directly. > > Joerg
Seemingly Similar Threads
- Help with setting up ARM embedded clang + lld
- Help with setting up ARM embedded clang + lld
- Help with setting up ARM embedded clang + lld
- llvm-objdump cannot recognize mul&mulh RISC-V M Instructions
- [RISCV][PIC] Lowering pseudo instructions in MCCodeEmitter vs AsmPrinter