Skip to content

Commit 2690815

Browse files
committed
Build Scimark2 with "rv32imf"
1 parent 1b70cb1 commit 2690815

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

docs/prebuilt.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ The prebuilt binaries in `rv32emu-prebuilt` are built from the following reposit
4949
- `pi` : See [tests/pi.c](/tests/pi.c)
5050
- `puzzle` : See [tests/puzzle.c](/tests/puzzle.c)
5151
- `qrcode` : See [tests/qrcode.c](/tests/qrcode.c)
52-
- `quake` : See [sysprog21/quake-embedded](https://github.com/sysprog21/quake-embedded)
5352
- `richards` : See [tests/richards.c](/tests/richards.c)
5453
- `rvsim` : See [tests/rvsim.c](/tests/rvsim.c)
55-
- `scimark2` : See [Scimark 2.0](https://math.nist.gov/scimark2)
5654
- `spirograph` : See [tests/spirograph.c](/tests/spirograph.c)
5755
- `uaes` : See [tests/uaes.c](/tests/uaes.c)
5856

57+
To determine performance of the floating point arithmetic, the following RISC-V binaries are built with option `-march=rv32imf`:
58+
- `quake` : See [sysprog21/quake-embedded](https://github.com/sysprog21/quake-embedded)
59+
- `scimark2` : See [Scimark 2.0](https://math.nist.gov/scimark2)
60+
5961
There are still some prebuilt standalone RISC-V binaries under `build/` directory only for testing purpose:
6062

6163
- `hello.elf` : See [tests/asm-hello](/tests/asm-hello)

mk/artifact.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,25 @@ else
7878
$(Q)$(PRINTF) "Building quake ...\n"
7979
$(Q)cd ./tests/quake && mkdir -p build && cd build && \
8080
cmake -DCMAKE_TOOLCHAIN_FILE=../port/boards/rv32emu/toolchain.cmake \
81-
-DCROSS_COMPILE=$(CROSS_COMPILE) \
82-
-DCMAKE_BUILD_TYPE=RELEASE -DBOARD_NAME=rv32emu .. && \
81+
-DCROSS_COMPILE=$(CROSS_COMPILE) \
82+
-DCMAKE_BUILD_TYPE=RELEASE -DBOARD_NAME=rv32emu .. && \
8383
make
8484
$(Q)cp ./tests/quake/build/port/boards/rv32emu/quake $(BIN_DIR)/riscv32/quake
8585
endif
8686

87-
scimark2: ieeelib
87+
scimark2:
8888
ifeq ($(call has, PREBUILT), 0)
8989
$(Q)$(call prologue,"scimark2")
9090
$(Q)$(call download,$(SCIMARK2_URL))
9191
$(Q)$(call verify,$(SCIMARK2_SHA1),$(notdir $(SCIMARK2_URL)))
9292
$(Q)$(call extract,"./tests/scimark2",$(notdir $(SCIMARK2_URL)))
9393
$(Q)$(call epilogue,$(notdir $(SCIMARK2_URL)),$(SHA1_FILE1),$(SHA1_FILE2))
9494
$(Q)$(PRINTF) "Building scimark2 ...\n"
95-
$(Q)$(MAKE) -C ./tests/scimark2 CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
95+
$(Q)$(MAKE) -C ./tests/scimark2 clean && $(RM) ./tests/scimark2/scimark2.o
96+
$(Q)$(MAKE) -C ./tests/scimark2 CC=$(CC) CFLAGS="-m32 -O2"
9697
$(Q)cp ./tests/scimark2/scimark2 $(BIN_DIR)/linux-x86-softfp/scimark2
9798
$(Q)$(MAKE) -C ./tests/scimark2 clean && $(RM) ./tests/scimark2/scimark2.o
98-
$(Q)$(MAKE) -C ./tests/scimark2 CC=$(CROSS_COMPILE)gcc CFLAGS="$(CFLAGS_CROSS)"
99+
$(Q)$(MAKE) -C ./tests/scimark2 CC=$(CROSS_COMPILE)gcc CFLAGS="-march=rv32imf -mabi=ilp32 -O2"
99100
$(Q)cp ./tests/scimark2/scimark2 $(BIN_DIR)/riscv32/scimark2
100101
endif
101102

0 commit comments

Comments
 (0)