efi: Don't assume x86 and x86_64 build flags

Change-Id: If11a892665d08f61c46b5a6a5b4bf0453225c3ee
Reviewed-on: https://review.haiku-os.org/c/1533
Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
Alexander von Gluck IV
2019-06-28 18:12:29 +00:00
committed by Alex von Gluck IV
parent 2a1cc90e3e
commit bc71f97ed7
+15 -7
View File
@@ -463,14 +463,22 @@ rule KernelArchitectureSetup architecture
case efi :
# efi bootloader is PIC
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fpic -fno-stack-protector
-fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main
-mno-red-zone ;
-fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fpic -fno-stack-protector
-fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main
-mno-red-zone ;
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -maccumulate-outgoing-args ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -maccumulate-outgoing-args ;
-fPIC -fshort-wchar -Wno-error=unused-variable -Wno-error=main ;
switch $(cpu) {
case x86 :
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -maccumulate-outgoing-args ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -maccumulate-outgoing-args ;
}
case x86_64 :
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -mno-red-zone ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -mno-red-zone ;
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -maccumulate-outgoing-args ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -maccumulate-outgoing-args ;
}
}
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS = -Bstatic -Bsymbolic
-nostdlib -znocombreloc -no-undefined ;