1# -*- Mode: makefile -*-
2#
3# Multiarch Tests - included from tests/tcg/Makefile.target
4#
5# These tests are plain C and built without any architecture specific code.
6#
7
8MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
9
10# Set search path for all sources
11VPATH 		+= $(MULTIARCH_SRC)
12MULTIARCH_SRCS   =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
13MULTIARCH_TESTS  =$(MULTIARCH_SRCS:.c=)
14
15# FIXME: ppc64abi32 linux-test seems to have issues but the other basic tests work
16ifeq ($(TARGET_NAME),ppc64abi32)
17BROKEN_TESTS = linux-test
18endif
19
20# Update TESTS
21TESTS		+= $(filter-out $(BROKEN_TESTS), $(MULTIARCH_TESTS))
22
23#
24# The following are any additional rules needed to build things
25#
26
27testthread: LDFLAGS+=-lpthread
28
29# We define the runner for test-mmap after the individual
30# architectures have defined their supported pages sizes. If no
31# additional page sizes are defined we only run the default test.
32
33# default case (host page size)
34run-test-mmap: test-mmap
35	$(call run-test, test-mmap, $(QEMU) $<, \
36		"$< (default) on $(TARGET_NAME)")
37
38# additional page sizes (defined by each architecture adding to EXTRA_RUNS)
39run-test-mmap-%: test-mmap
40	$(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
41		"$< ($* byte pages) on $(TARGET_NAME)")
42