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