# (C) Copyright 2000-2002
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
+ifeq ($(CONFIG_ARM64),y)
+FIXED_REG := -ffixed-x18
+else
+FIXED_REG := -ffixed-r9
+endif
+
+CFLAGS_NON_EFI := -fno-pic $(FIXED_REG) -ffunction-sections -fdata-sections \
-fstack-protector-strong
CFLAGS_EFI := -fpic -fshort-wchar
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
endif
-PLATFORM_RELFLAGS += -fno-common -ffixed-r9
+PLATFORM_RELFLAGS += -fno-common $(FIXED_REG)
PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
$(call cc-option,-mgeneral-regs-only) \
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
#
# (C) Copyright 2002
# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
-PLATFORM_RELFLAGS += -fno-common -ffixed-x18
PLATFORM_RELFLAGS += $(call cc-option,-mbranch-protection=none)
PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)