1# 2# arm64 makefile 3# 4# Authors: Andrew Jones <drjones@redhat.com> 5# 6bits = 64 7ldarch = elf64-littleaarch64 8 9arch_LDFLAGS = -pie -n 10arch_LDFLAGS += -z notext 11CFLAGS += -mstrict-align 12 13mno_outline_atomics := $(call cc-option, -mno-outline-atomics, "") 14CFLAGS += $(mno_outline_atomics) 15CFLAGS += -DCONFIG_RELOC 16 17define arch_elf_check = 18 $(if $(shell ! $(READELF) -rW $(1) >&/dev/null && echo "nok"), 19 $(error $(shell $(READELF) -rW $(1) 2>&1))) 20 $(if $(shell $(READELF) -rW $(1) | grep R_ | grep -v R_AARCH64_RELATIVE), 21 $(error $(1) has unsupported reloc types)) 22endef 23 24cstart.o = $(TEST_DIR)/cstart64.o 25cflatobjs += lib/arm64/stack.o 26cflatobjs += lib/arm64/processor.o 27cflatobjs += lib/arm64/spinlock.o 28cflatobjs += lib/arm64/gic-v3-its.o lib/arm64/gic-v3-its-cmd.o 29 30ifeq ($(CONFIG_EFI),y) 31cflatobjs += lib/acpi.o 32endif 33 34OBJDIRS += lib/arm64 35 36ifeq ($(CONFIG_EFI),y) 37# avoid jump tables before all relocations have been processed 38arm/efi/reloc_aarch64.o: CFLAGS += -fno-jump-tables 39cflatobjs += arm/efi/reloc_aarch64.o 40 41exe = efi 42else 43exe = flat 44endif 45 46# arm64 specific tests 47tests = $(TEST_DIR)/timer.$(exe) 48tests += $(TEST_DIR)/micro-bench.$(exe) 49tests += $(TEST_DIR)/cache.$(exe) 50tests += $(TEST_DIR)/debug.$(exe) 51 52include $(SRCDIR)/$(TEST_DIR)/Makefile.common 53 54arch_clean: arm_clean 55 $(RM) lib/arm64/.*.d 56