Commit 7d346222 authored by Tristan Gingold's avatar Tristan Gingold

Add build-riscv.txt

parent 465a2cc9
*
\ No newline at end of file
Commands used to build a toolchain for risc-v (from bash history, so cannot be
used directly as a script).
# binutils
cd binutils-2.30-objs
../binutils-2.30/configure --target=riscv32-elf --prefix=/opt/riscv
make -j16
make install-strip
# gmp, mpfr, mpc.
# gcc
mkdir gcc-7.3.0-objs
cd gcc-7.3.0-objs
PATH=/opt/riscv/bin/:$PATH
../gcc-7.3.0/configure --target=riscv32-elf --prefix=/opt/riscv --enable-languages=c --with-gmp=/opt/tg/install --disable-libssp --disable-libquadmath --disable-plugin --disable-lto
make -j30
make install
# newlib
mkdir newlib-3.0.0-objs
cd newlib-3.0.0-objs
../newlib-3.0.0/configure --target=riscv32-elf --prefix=/opt/riscv
make -j30
make install
# gcc
# gdb
# from: https://github.com/riscv/riscv-binutils-gdb.git
tar xvf riscv-gdb.tgz
cd riscv-binutils-gdb/
rm -rf gold ld binutils/ gprof/
rm -rf sim gas elfcpp
cd ..
mkdir gdb-objs/
../riscv-binutils-gdb/configure --target=riscv32-elf --prefix=/opt/riscv --without-python
make -j30
make install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment