Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 8648625 Oct 23, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
extern-gcc-testsuite @ 8ddded3 Add extern-gcc-testsuite Sep 11, 2017
riscv-clang @ 0189d2d Bump riscv-clang Sep 19, 2017
riscv-compiler-rt @ 2409b3d Add submodules Sep 11, 2017
riscv-gnu-toolchain @ dc3df86 Add submodules Sep 11, 2017
riscv-llvm @ 3a24817 Bump riscv-llvm Sep 18, 2017
.gitmodules Update repo path for riscv-gnu-toolchain Sep 11, 2017 Fix `make check` Oct 23, 2017 Add usage to readme Sep 14, 2017
clang-wrapper Add clang-wrapper Sep 9, 2017
configure Add new configure option: --enable-clang-only=[yes|no] Sep 21, 2017 Add new configure option: --enable-clang-only=[yes|no] Sep 21, 2017
install-sh Init Sep 9, 2017

RISC-V LLVM Toolchain

This is the RISC-V LLVM C and C++ cross-compiler. It supports ELF/Newlib toolchain only in this moment.

Getting the sources

This repository uses submodules. You need the --recursive option to fetch the submodules automatically

$ git clone --recursive


To build the Newlib cross-compiler, pick an install path. If you choose, say, /opt/riscv, then add /opt/riscv/bin to your PATH now. Then, simply run the following command:

./configure --prefix=/opt/riscv

You should now be able to use riscv-llvm and its cousins.

The build defaults to targetting RV64IMC (64-bit), even on a 32-bit build environment. To build the 32-bit RV32IMC toolchain, use:

./configure --prefix=/opt/riscv --with-arch=rv32imc

Supported architectures are rv32i or rv64i plus standard extensions (a)tomics, (m)ultiplication and division.


You can found a LLVM toolchain in your install path, we recommand you use riscv32-elf-unknown-clang (or riscv64-elf-unknown-clang for RV64) to compile program just like riscv32-elf-unknown-gcc instead of use clang directly.

Advanced Options

There are a number of additional options that may be passed to configure. See './configure --help' for more details.

You can’t perform that action at this time.