Browse Source

Add support for run testsuite with qemu

pull/182/head
Kito Cheng 10 years ago
parent
commit
b67b50ada0
  1. 7
      Makefile.in
  2. 13
      README.md
  3. 1
      scripts/wrapper/qemu/riscv32-unknown-linux-gnu-run
  4. 1
      scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run

7
Makefile.in

@ -275,6 +275,13 @@ check-gcc-newlib: stamps/build-gcc-newlib
cd build-gcc-newlib && \
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board=riscv-sim"
check-gcc-linux: stamps/build-gcc-linux-stage2
export PATH=$(srcdir)/scripts/wrapper/qemu:$(INSTALL_DIR)/bin:$(PATH) && \
export DEJAGNULIBS=$(srcdir)/riscv-dejagnu && \
export RISC_V_SYSROOT=$(SYSROOT) && \
cd build-gcc-linux-stage2 && \
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board=riscv-sim"
clean:
rm -rf build-* $(addprefix src/,$(PACKAGES)) stamps

13
README.md

@ -82,9 +82,16 @@ configure. See './configure --help' for more details.
### Test Suite
The DejaGnu test suite has been ported to RISC-V. This currently only runs in
the GDB simulator, which doesn't support floating-point or Linux/glibc. To
test GCC, run the following commands:
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-float --disable-linux
make newlib
make check-gcc-newlib
./configure --prefix=$RISCV
make linux
# Need qemu-riscv32 or qemu-riscv64 in your `PATH`.
make check-gcc-linux

1
scripts/wrapper/qemu/riscv32-unknown-linux-gnu-run

@ -0,0 +1 @@
qemu-riscv32 -L ${RISC_V_SYSROOT} $*

1
scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run

@ -0,0 +1 @@
qemu-riscv64 -L ${RISC_V_SYSROOT} $*
Loading…
Cancel
Save