Giter Club home page Giter Club logo

riscv-gnu-toolchain's Introduction

RISC-V GNU Compiler Toolchain

This is the RISC-V C and C++ cross-compiler.

Getting the sources

Note: This repository uses submodules:

$ git clone https://github.com/wezm/riscv-gnu-toolchain.git
$ cd riscv-gnu-toolchain
$ git submodule update --init

Prerequisites

Building requires Docker or Podman. Build the docker image with:

docker build -t riscv-nuclei-elf-toolchain -f docker/Dockerfile docker

Building (Newlib)

To build the Newlib cross-compiler, you must have cloned the code and built the docker image as above. Run the build in a container. The result is written to the out directory:

docker run --rm -it -v $(pwd):/src -v $(pwd)/out:/out riscv-nuclei-elf-toolchain docker/build-newlib

You should now be able to use riscv64-unknown-elf-gcc and friends.

Test Suite (Untested in this fork)

The DejaGnu test suite has been ported to RISC-V. This can run with GDB simulator for elf toolchain or Qemu for linux toolchain, and GDB simulator doesn't support floating-point. To test GCC, run the following commands:

./configure --prefix=$RISCV --disable-linux --with-arch=rv64ima # or --with-arch=rv32ima
make newlib
make report-newlib

./configure --prefix=$RISCV
make linux
make report-linux

riscv-gnu-toolchain's People

Contributors

palmer-dabbelt avatar aswaterman avatar kito-cheng avatar a0u avatar darius-bluespec avatar timsifive avatar yunsup avatar colinschmidt avatar vapier avatar sbeamer avatar wezm avatar manuelafm avatar divan0v avatar arsv avatar gkelly avatar mickflemm avatar sorear avatar tjyang avatar svenstucki avatar wallento avatar rbarzic avatar pmundkur avatar pkmx avatar omasanori avatar martinmaas avatar kyrias avatar austinharris avatar arunthomas avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.