From 58eb560a84ea2d6a392f7e75bba649a0c5946617 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 20 Nov 2020 19:22:53 -0800 Subject: Only attempt to build tests supported by compiler Resolves #303 --- isa/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'isa/Makefile') 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) -- cgit v1.1