[llvm-dev] [Looking for Mentor] RISC-V linker

blubee blubeeme via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 22 17:11:13 PDT 2018


There's the lowRISC project: https://github.com/lowRISC/riscv-llvm

I'd like to use LLVM RISC-V but reading the FAQ there's this line:
How can I build upstream LLVM+Clang and use it to cross-compile for a
riscv32 target?

First you will need a built RISC-V gcc toolchain. The linker, compiled
libraries, and libc header files will be used. You can build your own by
following the instructions at the riscv-gnu-toolchain repo
<https://github.com/riscv/riscv-gnu-toolchain>. It is sufficient to do the
following:

That's a bit of a waste...

Why would I build the entire GNU RISC-V toolchain just to build the LLVM
toolchain?

I think that LLVM should have the capabilities use it's own linker,
compiled libraries, etc..

I'd like to find a mentor who I can occasionally ping with a question here
or there about certain things while trying to get this up and running.

A major question that I have that I come across many times with LLVM
projects are that they still require GNU headers, why is that?

I've tracked down the relevant starting place to lib/Driver/ToolChains/*

Where different linkers are implemented.

I did see a code review where someone from LLVM wanted to implement risc-v
detection code in baremetal instead of creating something new:
https://reviews.llvm.org/D42673

but looking recently there's the RISC-V headers for Clang:
http://llvm.org/svn/llvm-project/cfe/trunk/lib/Driver/ToolChains/RISCV.h
http://llvm.org/svn/llvm-project/cfe/trunk/lib/Driver/ToolChains/RISCV.cpp

I'd like to help to get the linker up and running so that I can avoid
having to build the entire GNU toolchain to use RISC-V.

Best,
Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180823/8a8001c3/attachment.html>


More information about the llvm-dev mailing list