blob: 25e5b58e707649a86a2499858e07cf1e10738fab [file] [log] [blame]
Author: Steve Langasek <steve.langasek@ubuntu.com>
Description: pass -fno-stack-protector to all GCC toolchains
The upstream build rules inexplicably pass -fno-stack-protector only
when building for i386 and amd64. Add this essential argument to the
generic rules for gcc 4.4 and later.
Last-Updated: 2016-04-12
Upstream-Status: Pending
Index: git/BaseTools/Conf/tools_def.template
===================================================================
--- git.orig/BaseTools/Conf/tools_def.template
+++ git/BaseTools/Conf/tools_def.template
@@ -4368,7 +4368,7 @@ DEFINE GCC_IPF_RC_FLAGS = -I
DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
-DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_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
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie