Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request' into...
[qemu/ar7.git] / tests / tcg / cris / Makefile.target
blobe72d3cbdb23e2154c1ae25277939159a81a13121
1 # -*- Mode: makefile -*-
3 # Cris tests
5 # Currently we can only build the "bare" tests with the docker
6 # supplied cross-compiler.
9 CRIS_SRC = $(SRC_PATH)/tests/tcg/cris/bare
10 CRIS_ALL = $(wildcard $(CRIS_SRC)/*.s)
11 CRIS_TESTS = $(patsubst $(CRIS_SRC)/%.s, %, $(CRIS_ALL))
12 # Filter out common blobs and broken tests
13 CRIS_BROKEN_TESTS  = crt check_jsr
14 # upstream GCC doesn't support v32
15 CRIS_BROKEN_TESTS += check_mcp check_mulv32 check_addiv32 check_movpmv32
16 CRIS_BROKEN_TESTS += check_movprv32 check_clearfv32 check_movemrv32 check_bas
17 CRIS_BROKEN_TESTS += check_lapc check_movei
18 # no sure why
19 CRIS_BROKEN_TESTS += check_scc check_xarith
21 CRIS_USABLE_TESTS = $(filter-out $(CRIS_BROKEN_TESTS), $(CRIS_TESTS))
22 CRIS_RUNS = $(patsubst %, run-%, $(CRIS_USABLE_TESTS))
24 # override the list of tests, as we can't build the multiarch tests
25 TESTS = $(CRIS_USABLE_TESTS)
26 EXTRA_RUNS =
27 VPATH = $(CRIS_SRC)
29 AS      = $(CC) -x assembler-with-cpp
30 LD      = $(CC)
32 # we rely on GCC inline:ing the stuff we tell it to in many places here.
33 CFLAGS  = -Winline -Wall -g -O2 -static
34 NOSTDFLAGS = -nostartfiles -nostdlib
35 ASFLAGS += -mcpu=v10 -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/bare
36 CRT_FILES = crt.o sys.o
38 # stop make deleting crt files if build fails
39 .PRECIOUS: $(CRT_FILES)
41 %.o: %.c
42         $(CC) -c $< -o $@
44 %.o: %.s
45         $(AS) $(ASFLAGS) -c $< -o $@
47 %: %.s $(CRT_FILES)
48         $(CC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT_FILES)
50 # The default CPU breaks (possibly as it's max?) so force crisv17
51 QEMU_OPTS=-cpu crisv17
53 # Additional runners to run under GNU SIM
54 CRIS_RUNS_ON_SIM=$(patsubst %, %-on-sim, $(CRIS_RUNS))
55 SIMG:=cris-axis-linux-gnu-run
57 # e.g.: make -f ../../tests/tcg/Makefile run-check_orm-on-sim
58 run-%-on-sim:
59         $(call run-test, $<, $(SIMG) $<, "$< on $(TARGET_NAME) with SIM")