| # | |
| # arm makefile | |
| # | |
| # Authors: Andrew Jones <drjones@redhat.com> | |
| # | |
| bits = 32 | |
| ldarch = elf32-littlearm | |
| machine = -marm -mfpu=vfp | |
| ifeq ($(CONFIG_EFI),y) | |
| $(error Cannot build arm32 tests as EFI apps) | |
| endif | |
| CFLAGS += $(machine) | |
| CFLAGS += -mno-unaligned-access | |
| ifeq ($(TARGET),qemu) | |
| arch_LDFLAGS = -Ttext=40010000 | |
| else ifeq ($(TARGET),kvmtool) | |
| arch_LDFLAGS = -Ttext=80008000 | |
| else | |
| $(error Unknown target $(TARGET)) | |
| endif | |
| define arch_elf_check = | |
| endef | |
| cstart.o = $(TEST_DIR)/cstart.o | |
| cflatobjs += lib/arm/spinlock.o | |
| cflatobjs += lib/arm/processor.o | |
| cflatobjs += lib/arm/stack.o | |
| cflatobjs += lib/ldiv32.o | |
| cflatobjs += lib/arm/ldivmod.o | |
| exe = flat | |
| # arm specific tests | |
| tests = | |
| include $(SRCDIR)/$(TEST_DIR)/Makefile.common | |
| ifneq ($(KEEP_FRAME_POINTER),) | |
| # Force the generation of an APCS stack frame layout to be able to reliably | |
| # walk the stack. Otherwise the compiler may omit saving LR on the stack for | |
| # leaf functions and, unfortunately, -mno-omit-leaf-frame-pointer isn't | |
| # supported on ARM :( | |
| LATE_CFLAGS += $(call cc-option, -mapcs-frame -DAPCS_FRAMES, "") | |
| endif | |
| arch_clean: arm_clean |