]>
Commit | Line | Data |
---|---|---|
f6482872 AB |
1 | # |
2 | # Aarch64 system tests | |
3 | # | |
4 | ||
5 | AARCH64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/aarch64/system | |
6 | VPATH+=$(AARCH64_SYSTEM_SRC) | |
7 | ||
8 | # These objects provide the basic boot code and helper functions for all tests | |
9 | CRT_OBJS=boot.o | |
10 | ||
11 | AARCH64_TEST_SRCS=$(wildcard $(AARCH64_SYSTEM_SRC)/*.c) | |
12 | AARCH64_TESTS = $(patsubst $(AARCH64_SYSTEM_SRC)/%.c, %, $(AARCH64_TEST_SRCS)) | |
13 | ||
14 | CRT_PATH=$(AARCH64_SYSTEM_SRC) | |
15 | LINK_SCRIPT=$(AARCH64_SYSTEM_SRC)/kernel.ld | |
16 | LDFLAGS=-Wl,-T$(LINK_SCRIPT) | |
17 | TESTS+=$(AARCH64_TESTS) $(MULTIARCH_TESTS) | |
18 | CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) | |
19 | LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc | |
20 | ||
21 | # building head blobs | |
22 | .PRECIOUS: $(CRT_OBJS) | |
23 | ||
24 | %.o: $(CRT_PATH)/%.S | |
6a9e0ef3 | 25 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ |
f6482872 AB |
26 | |
27 | # Build and link the tests | |
28 | %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) | |
6a9e0ef3 | 29 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) |
f6482872 | 30 | |
7ac283e9 AB |
31 | memory: CFLAGS+=-DCHECK_UNALIGNED=1 |
32 | ||
f6482872 AB |
33 | # Running |
34 | QEMU_OPTS+=-M virt -cpu max -display none -semihosting-config enable=on,target=native,chardev=output -kernel |