Re: [kvm-unit-tests PATCH v2 21/23] x86: Move x86_64-specific EFI CFLAGS to x86_64 Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ricardo,

On 21/06/2022 23:45, Ricardo Koller wrote:
On Fri, May 06, 2022 at 09:56:03PM +0100, 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@xxxxxxx>
---
  Makefile            | 4 ----
  x86/Makefile.x86_64 | 4 ++++
  2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 6ed5dea..307bc29 100644
--- a/Makefile
+++ b/Makefile
@@ -40,14 +40,10 @@ OBJDIRS += $(LIBFDT_objdir)
# EFI App
  ifeq ($(CONFIG_EFI),y)
-EFI_ARCH = x86_64

Should this be moved to the x86 Makefile as well? (just in case)

I searched for uses of EFI_ARCH and I couldn't find any. It would be good if people more familiar with x86 would approve this though.

Thanks,

Nikos


  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 f18c1e2..ac588ed 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
--
2.25.1


Reviewed-by: Ricardo Koller <ricarkol@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux