Xiaochu Liu via llvm-dev
2015-Sep-10 00:10 UTC
[llvm-dev] how to link clang generated obj targeting BPF
Dear there, I was trying to use clang to cross compile executable directly on my mac to bpf ISA: clang -target bpf-linux-gnu aaa.c But I guess maybe the linker does not support BPF? (with -c clang can generate unlinked objs) Unexpected arch UNREACHABLE executed at llvm/tools/clang/lib/Driver/Tools.cpp:8113 Should I use other linkers to link clang generated BPF objs? Thanks, Xiaochu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150910/e912b50e/attachment.html>
Alexei Starovoitov via llvm-dev
2015-Sep-10 00:13 UTC
[llvm-dev] how to link clang generated obj targeting BPF
On Wed, Sep 9, 2015 at 5:10 PM, Xiaochu Liu via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Dear there, > > I was trying to use clang to cross compile executable directly on my mac to > bpf ISA: > > clang -target bpf-linux-gnu aaa.c > > But I guess maybe the linker does not support BPF? (with -c clang can > generate unlinked objs) > > Unexpected arch > UNREACHABLE executed at > llvm/tools/clang/lib/Driver/Tools.cpp:8113 > > Should I use other linkers to link clang generated BPF objs?there is no linker for BPF. It can only produce .o so just add -c
Xiaochu Liu via llvm-dev
2015-Sep-10 00:22 UTC
[llvm-dev] how to link clang generated obj targeting BPF
I see. Thanks! On Wed, Sep 9, 2015 at 5:13 PM Alexei Starovoitov < alexei.starovoitov at gmail.com> wrote:> On Wed, Sep 9, 2015 at 5:10 PM, Xiaochu Liu via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Dear there, > > > > I was trying to use clang to cross compile executable directly on my mac > to > > bpf ISA: > > > > clang -target bpf-linux-gnu aaa.c > > > > But I guess maybe the linker does not support BPF? (with -c clang can > > generate unlinked objs) > > > > Unexpected arch > > UNREACHABLE executed at > > llvm/tools/clang/lib/Driver/Tools.cpp:8113 > > > > Should I use other linkers to link clang generated BPF objs? > > there is no linker for BPF. It can only produce .o > so just add -c >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150910/8d8a1e65/attachment.html>