From a0f72928029460a1d655f8e91e912223561d4ada Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 8 Aug 2018 10:10:37 -0500 Subject: [PATCH] efi: no-red-zone and accumulate-outgoing-args only x86 Change-Id: Ic9d94298d21e55beb2829be8dbd09f4b3d5db99a --- build/jam/ArchitectureRules | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 4ff33d91f2..38ff33e53a 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -376,6 +376,12 @@ rule KernelArchitectureSetup architecture HAIKU_KERNEL_CCFLAGS += -march=pentium ; HAIKU_KERNEL_C++FLAGS += -march=pentium ; + # EFI Bootloader + if $(HAIKU_BOOT_PLATFORM) = efi { + HAIKU_BOOT_CCFLAGS += -mno-red-zone -maccumulate-outgoing-args ; + HAIKU_BOOT_C++FLAGS += -mno-red-zone -maccumulate-outgoing-args ; + } + case x86_64 : # Kernel lives in the top 2GB of the address space, use kernel code # model. @@ -396,6 +402,12 @@ rule KernelArchitectureSetup architecture HAIKU_BOOT_C++FLAGS += -m32 -march=pentium ; } + # EFI Bootloader + if $(HAIKU_BOOT_PLATFORM) = efi { + HAIKU_BOOT_CCFLAGS += -mno-red-zone -maccumulate-outgoing-args ; + HAIKU_BOOT_C++FLAGS += -mno-red-zone -maccumulate-outgoing-args ; + } + if x86 in $(HAIKU_ARCHS[2-]) || x86_gcc2 in $(HAIKU_ARCHS[2-]) { Echo "Enable kernel ia32 compatibility" ; HAIKU_KERNEL_DEFINES += _COMPAT_MODE ; @@ -404,10 +416,10 @@ rule KernelArchitectureSetup architecture } if $(HAIKU_BOOT_PLATFORM) = efi { - HAIKU_BOOT_CCFLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar -mno-red-zone - -maccumulate-outgoing-args -Wno-error=unused-variable ; - HAIKU_BOOT_C++FLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar -mno-red-zone - -maccumulate-outgoing-args -Wno-error=unused-variable ; + HAIKU_BOOT_CCFLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar + -Wno-error=unused-variable ; + HAIKU_BOOT_C++FLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar + -Wno-error=unused-variable ; HAIKU_BOOT_LDFLAGS = -Bstatic -Bsymbolic -shared -nostdlib -znocombreloc -nostartfiles -no-undefined ; } else { HAIKU_BOOT_CCFLAGS += -fno-pic ;