From d787141342549b3d75777e62131f506b9b775840 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 28 Oct 2018 19:29:13 -0500 Subject: [PATCH] efi: Only no-red-zone and accumulate on x86_64 * We're making the assumption about EFI here, but it's fine since those defines will just go unused on non-efi builds. * Jam segfaults when we get two for's, a case, and an if deep. (adding an x86_64 check to efi section just below) Change-Id: Id98e87b6570ddc7d9c2195cd05b0526e71771675 --- build/jam/ArchitectureRules | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 0c8e93be92..c4d4757c16 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -415,6 +415,10 @@ rule KernelArchitectureSetup architecture HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ; HAIKU_KERNEL_ADDON_LINKFLAGS += -z max-page-size=0x1000 ; + # Just slip these in here as well for EFI (if used) + HAIKU_BOOT_EFI_CCFLAGS += -mno-red-zone -maccumulate-outgoing-args ; + HAIKU_BOOT_EFI_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 ; @@ -429,11 +433,9 @@ rule KernelArchitectureSetup architecture case efi : # efi bootloader is PIC HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fpic -fno-stack-protector - -fPIC -fshort-wchar -mno-red-zone -maccumulate-outgoing-args - -Wno-error=unused-variable -Wno-error=main ; + -fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main ; HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fpic -fno-stack-protector - -fPIC -fshort-wchar -mno-red-zone -maccumulate-outgoing-args - -Wno-error=unused-variable -Wno-error=main ; + -fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main ; HAIKU_BOOT_$(bootTarget:U)_LDFLAGS = -Bstatic -Bsymbolic -nostdlib -znocombreloc -nostartfiles -no-undefined ; case bios_ia32 :