aboutsummaryrefslogtreecommitdiff
path: root/isa/Makefile
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2020-11-20 19:22:53 -0800
committerAndrew Waterman <andrew@sifive.com>2020-11-20 19:22:53 -0800
commit58eb560a84ea2d6a392f7e75bba649a0c5946617 (patch)
tree266bb1c5a66bc03b5c7e70c32679c5235bc0d8a3 /isa/Makefile
parent5f8a4918c6482e65c67a2b7decd5c2af3e3fe0e5 (diff)
downloadriscv-tests-58eb560a84ea2d6a392f7e75bba649a0c5946617.zip
riscv-tests-58eb560a84ea2d6a392f7e75bba649a0c5946617.tar.gz
riscv-tests-58eb560a84ea2d6a392f7e75bba649a0c5946617.tar.bz2
Only attempt to build tests supported by compiler
Resolves #303
Diffstat (limited to 'isa/Makefile')
-rw-r--r--isa/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/isa/Makefile b/isa/Makefile
index ca49960..892ed72 100644
--- a/isa/Makefile
+++ b/isa/Makefile
@@ -69,7 +69,11 @@ $(1): $$($(1)_tests_dump)
.PHONY: $(1)
+COMPILER_SUPPORTS_$(1) := $$(shell $$(RISCV_GCC) $(2) -c -x c /dev/null -o /dev/null 2> /dev/null; echo $$$$?)
+
+ifeq ($$(COMPILER_SUPPORTS_$(1)),0)
tests += $$($(1)_tests)
+endif
endef
@@ -96,8 +100,8 @@ endif
tests_dump = $(addsuffix .dump, $(tests))
tests_hex = $(addsuffix .hex, $(tests))
-tests_out = $(addsuffix .out, $(spike_tests))
-tests32_out = $(addsuffix .out32, $(spike32_tests))
+tests_out = $(addsuffix .out, $(filter rv64%,$(tests)))
+tests32_out = $(addsuffix .out32, $(filter rv32%,$(tests)))
run: $(tests_out) $(tests32_out)