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