@@ -40,14 +40,10 @@ OBJDIRS += $(LIBFDT_objdir)
# EFI App
ifeq ($(CONFIG_EFI),y)
-EFI_ARCH = x86_64
EFI_CFLAGS := -DCONFIG_EFI
# The following CFLAGS and LDFLAGS come from:
# - GNU-EFI/Makefile.defaults
# - GNU-EFI/apps/Makefile
-# Function calls must include the number of arguments passed to the functions
-# More details: https://wiki.osdev.org/GNU-EFI
-EFI_CFLAGS += -maccumulate-outgoing-args
# GCC defines wchar to be 32 bits, but EFI expects 16 bits
EFI_CFLAGS += -fshort-wchar
# EFI applications use PIC as they are loaded to dynamic addresses, not a fixed
@@ -2,6 +2,10 @@ cstart.o = $(TEST_DIR)/cstart64.o
bits = 64
ldarch = elf64-x86-64
ifeq ($(CONFIG_EFI),y)
+# Function calls must include the number of arguments passed to the functions
+# More details: https://wiki.osdev.org/GNU-EFI
+CFLAGS += -maccumulate-outgoing-args
+
exe = efi
bin = so
FORMAT = efi-app-x86_64
Compiler flag -macculate-outgoing-args is only needed by the x86_64 ABI. Move it to the relevant Makefile. Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> --- Makefile | 4 ---- x86/Makefile.x86_64 | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)