Message ID | 20230428120405.3770496-3-nikos.nikoleris@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | EFI and ACPI support for arm64 | expand |
On 4/28/23 20:03, Nikos Nikoleris wrote: > 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> > Reviewed-by: Ricardo Koller <ricarkol@google.com> Reviewed-by: Shaoqin Huang <shahuang@redhat.com> > --- > Makefile | 4 ---- > x86/Makefile.x86_64 | 4 ++++ > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index 6ed5deac..307bc291 100644 > --- a/Makefile > +++ b/Makefile > @@ -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 > diff --git a/x86/Makefile.x86_64 b/x86/Makefile.x86_64 > index f483dead..2771a6fa 100644 > --- a/x86/Makefile.x86_64 > +++ b/x86/Makefile.x86_64 > @@ -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
diff --git a/Makefile b/Makefile index 6ed5deac..307bc291 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/x86/Makefile.x86_64 b/x86/Makefile.x86_64 index f483dead..2771a6fa 100644 --- a/x86/Makefile.x86_64 +++ b/x86/Makefile.x86_64 @@ -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