blob: 8212d96b81dea8e446bd3b789dd2b34e7bd5c376 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#
# Xtensa softmmu tests
#
ifneq ($(TARGET_WORDS_BIGENDIAN),y)
XTENSA_SRC = $(SRC_PATH)/tests/tcg/xtensa
XTENSA_ALL = $(filter-out $(XTENSA_SRC)/linker.ld.S,$(wildcard $(XTENSA_SRC)/*.S))
XTENSA_TESTS = $(patsubst $(XTENSA_SRC)/%.S, %, $(XTENSA_ALL))
# Filter out common blobs and broken tests
XTENSA_BROKEN_TESTS = crt vectors
XTENSA_USABLE_TESTS = $(filter-out $(XTENSA_BROKEN_TESTS), $(XTENSA_TESTS))
# add to the list of tests
TESTS += $(XTENSA_USABLE_TESTS)
VPATH += $(XTENSA_SRC)
CORE=dc232b
QEMU_OPTS+=-M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel
INCLUDE_DIRS = $(SRC_PATH)/target/xtensa/core-$(CORE)
XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
vectors_ASFLAGS = -mtext-section-literals
ASFLAGS = -Wa,--no-absolute-literals
LDFLAGS = -Tlinker.ld -nostartfiles -nostdlib
CRT = crt.o vectors.o
linker.ld: linker.ld.S
$(CC) $(XTENSA_INC) -E -P $< -o $@
$(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
# special rule for common blobs
%.o: %.S
$(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@
%: %.S
$(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
endif
|