blob: 960880f1c09f7c3b02503030e855ab353e55ecf8 [file] [log] [blame]
#
# arm64 makefile
#
# Authors: Andrew Jones <drjones@redhat.com>
#
bits = 64
ldarch = elf64-littleaarch64
arch_LDFLAGS = -pie -n
arch_LDFLAGS += -z notext
CFLAGS += -mstrict-align
mno_outline_atomics := $(call cc-option, -mno-outline-atomics, "")
CFLAGS += $(mno_outline_atomics)
CFLAGS += -DCONFIG_RELOC
define arch_elf_check =
$(if $(shell ! $(READELF) -rW $(1) >&/dev/null && echo "nok"),
$(error $(shell $(READELF) -rW $(1) 2>&1)))
$(if $(shell $(READELF) -rW $(1) | grep R_ | grep -v R_AARCH64_RELATIVE),
$(error $(1) has unsupported reloc types))
endef
cstart.o = $(TEST_DIR)/cstart64.o
cflatobjs += lib/arm64/stack.o
cflatobjs += lib/arm64/processor.o
cflatobjs += lib/arm64/spinlock.o
cflatobjs += lib/arm64/gic-v3-its.o lib/arm64/gic-v3-its-cmd.o
ifeq ($(CONFIG_EFI),y)
cflatobjs += lib/acpi.o
endif
OBJDIRS += lib/arm64
ifeq ($(CONFIG_EFI),y)
# avoid jump tables before all relocations have been processed
arm/efi/reloc_aarch64.o: CFLAGS += -fno-jump-tables
cflatobjs += arm/efi/reloc_aarch64.o
exe = efi
else
exe = flat
endif
# arm64 specific tests
tests = $(TEST_DIR)/timer.$(exe)
tests += $(TEST_DIR)/micro-bench.$(exe)
tests += $(TEST_DIR)/cache.$(exe)
tests += $(TEST_DIR)/debug.$(exe)
include $(SRCDIR)/$(TEST_DIR)/Makefile.common
arch_clean: arm_clean
$(RM) lib/arm64/.*.d