From 2ddce71142a6243aa4dc64242553d6591eb58def Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 5 Aug 2024 18:32:19 +0100 Subject: [PATCH] EmulatorPkg: fix X64 Unix/Host segfault with GCC toolchain profile Add the necessary toolchain override flags for ms_abi and LTO on X64 for the unversioned GCC toolchain profile. This resolves a runtime segmentation fault. Signed-off-by: Leif Lindholm --- EmulatorPkg/Unix/Host/Host.inf | 1 + 1 file changed, 1 insertion(+) diff --git a/EmulatorPkg/Unix/Host/Host.inf b/EmulatorPkg/Unix/Host/Host.inf index f5ebbed683..1b7481d1e0 100644 --- a/EmulatorPkg/Unix/Host/Host.inf +++ b/EmulatorPkg/Unix/Host/Host.inf @@ -124,6 +124,7 @@ GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os + GCC:*_GCC_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h