Skip to content

How to regression test

pz9115 edited this page Feb 7, 2021 · 2 revisions
  1. make sure you had installed git and build-essential tools. If tips any error with miss, just use apt-get install to install it
apt-get install git build-essential tcl expect flex texinfo bison libpixman-1-dev libglib2.0-dev pkg-config zlib1g-dev ninja-build 
  1. download riscv-gnu-toolchain form github
$ git clone https://github.com/riscv/riscv-gnu-toolchain
$ cd riscv-gnu-toolchain
$ git submodule update --init --recursive
$ cd ..
$ cp riscv-gnu-toolchain zfinx -r && cd zfinx
  1. switch gcc、binutils、qemu form github
$ cd riscv-gcc
$ git remote add zfinx https://github.com/pz9115/riscv-gcc.git
$ git fetch zfinx
$ git checkout zfinx/riscv-gcc-10.2.0-zfinx
$ cd ../riscv-binutils
$ git remote add zfinx https://github.com/pz9115/riscv-binutils-gdb.git
$ git fetch zfinx
$ git checkout zfinx/riscv-binutils-2.35-zfinx
$ cd ../qemu
$ git remote add plct-qemu https://github.com/isrc-cas/plct-qemu.git
$ git fetch plct-qemu
$ git checkout plct-qemu/plct-zfinx-dev
$ git reset --hard d73c46e4a84e47ffc61b8bf7c378b1383e7316b5
$ cd ..
  1. set configure in riscv-gnu-toolchain for compile
# for rv64:
$ ./configure --prefix=/opt/rv64/ --with-arch=rv64gc --with-abi=lp64 --with-multilib-generator="rv64gc-lp64--"

# for rv32:
$ ./configure --prefix=/opt/rv32/ --with-arch=rv32gc --with-abi=ilp32 --with-multilib-generator="rv32gc-ilp32--"

# for rv32e:
$ ./configure --prefix=/opt/rv32e/ --with-arch=rv32ec --with-abi=ilp32e --with-multilib-generator="rv32ec-ilp32e--"
  1. regression test
# you can use make -j* to make speed up
# see the report
$ make report-gcc-newlib 2>&1|tee gcclog.md
$ make report-binutils-newlib 2>&1|tee binutilslog.md
# Use `make clean` to re-check different abi, reset configure and remake for other abi again (lp64\ilp32\ilp32e)
Clone this wiki locally