From OR1K


The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them.

This page describes the port of LLVM for the OpenRISC 1000 architecture.

Further generic information on the LLVM project's webpage.

Getting started

The most up-to-date development currently takes place at

In order to be able to compile C/C++ programs, two components are required, Clang and LLVM.

Start with checking out LLVM

git clone git://

and Clang

git clone git://

Clang is held in it's own repository as it is a seperate project from LLVM, but is meant to be built together with LLVM in the LLVM tree.

Create a symlink to the checked out Clang repository in the LLVM tree

cd llvm-or1k/tools/
ln -s ../../clang-or1k/ clang

go back to the top directory where you you checked out Clang and LLVM and create a build directory

cd ../../
mkdir build
cd build

LLVM has support for both autotools and cmake based configuration, use the one that suits you best.


cmake ../llvm-or1k -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/path/to/instdir


../llvm-or1k/configure CC=gcc CXX=g++ --enable-debug-runtime --prefix=/path/to/instdir

and finally build and install

make install

© copyright 1999-2015, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.