blob: d710429899b8f3b0eed402e51f34f5547aeaae09 [file] [log] [blame]
Andrew Geissler09036742021-06-25 14:25:14 -05001From 67267d8cc31df16a3608cad1a17c5f1470ef8bbd Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Steve Langasek <steve.langasek@ubuntu.com>
3Date: Sat, 10 Jun 2017 01:39:36 -0700
Andrew Geissler09036742021-06-25 14:25:14 -05004Subject: [PATCH 3/6] ovmf: Update to latest
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6Description: pass -fno-stack-protector to all GCC toolchains
7 The upstream build rules inexplicably pass -fno-stack-protector only
8 when building for i386 and amd64. Add this essential argument to the
9 generic rules for gcc 4.4 and later.
10Last-Updated: 2016-04-12
11Upstream-Status: Pending
Andrew Geissler82c905d2020-04-13 13:39:40 -050012---
13 BaseTools/Conf/tools_def.template | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
Andrew Geissler09036742021-06-25 14:25:14 -050017index 498696e583..36241b6ede 100755
Andrew Geissler82c905d2020-04-13 13:39:40 -050018--- a/BaseTools/Conf/tools_def.template
19+++ b/BaseTools/Conf/tools_def.template
Andrew Geissler09036742021-06-25 14:25:14 -050020@@ -1897,10 +1897,10 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv
Andrew Geisslerc182c622020-05-15 14:13:32 -050021 # GCC Build Flag for included header file list generation
22 DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps
Andrew Geissler82c905d2020-04-13 13:39:40 -050023
Andrew Geissler6ce62a22020-11-30 19:58:47 -060024-DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
25+DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -fno-stack-protector -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
Andrew Geissler82c905d2020-04-13 13:39:40 -050026 DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
27-DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
28-DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
29+DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
30+DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
31 DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
32 DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
33 DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
Andrew Geissler09036742021-06-25 14:25:14 -050034@@ -1909,7 +1909,7 @@ DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF
Andrew Geissler82c905d2020-04-13 13:39:40 -050035 DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
36 DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
37 DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
38-DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
39+DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mword-relocations
40 DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
41 DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
42 DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
43--
Andrew Geissler09036742021-06-25 14:25:14 -0500442.32.0
Andrew Geissler82c905d2020-04-13 13:39:40 -050045