1*b97028b8SRichard Henderson#
2*b97028b8SRichard Henderson# RISC-V system tests
3*b97028b8SRichard Henderson#
4*b97028b8SRichard Henderson
5*b97028b8SRichard HendersonTEST_SRC = $(SRC_PATH)/tests/tcg/riscv64
6*b97028b8SRichard HendersonVPATH += $(TEST_SRC)
7*b97028b8SRichard Henderson
8*b97028b8SRichard HendersonLINK_SCRIPT = $(TEST_SRC)/semihost.ld
9*b97028b8SRichard HendersonLDFLAGS = -T $(LINK_SCRIPT)
10*b97028b8SRichard HendersonCFLAGS += -g -Og
11*b97028b8SRichard Henderson
12*b97028b8SRichard Henderson%.o: %.S
13*b97028b8SRichard Henderson	$(CC) $(CFLAGS) $< -c -o $@
14*b97028b8SRichard Henderson%: %.o $(LINK_SCRIPT)
15*b97028b8SRichard Henderson	$(LD) $(LDFLAGS) $< -o $@
16*b97028b8SRichard Henderson
17*b97028b8SRichard HendersonQEMU_OPTS += -M virt -display none -semihosting -device loader,file=
18*b97028b8SRichard Henderson
19*b97028b8SRichard HendersonEXTRA_RUNS += run-issue1060
20*b97028b8SRichard Hendersonrun-issue1060: issue1060
21*b97028b8SRichard Henderson	$(call run-test, $<, $(QEMU) $(QEMU_OPTS)$<)
22