From: yshang1 Date: Tue, 6 Nov 2007 05:30:16 +0000 (+0000) Subject: Add the -mno-red-zone for gcc on x64. Since the GNU calling convention of x64 defines... X-Git-Tag: edk2-stable201903~21785 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=8a0d144b3992c1435861604ff19f321ddeb10e8c Add the -mno-red-zone for gcc on x64. Since the GNU calling convention of x64 defines the 128bytes red zone beyond the stack point could not be modified by interrupt or exception handler, and Edk prime assumes all data beyond stack point should be volatile, if not add the option, the interrupt or exception handler may corrupt the red zone, which may be used as temporary storage. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4271 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 8097fc2128..6c0c43ad3b 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -464,7 +464,7 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT *_CYGWINGCC_IA32_PP_PATH = DEF(CYGWIN_BIN32)/gcc *_CYGWINGCC_IA32_VFRPP_PATH = DEF(CYGWIN_BIN32)/gcc -*_CYGWINGCC_IA32_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h +*_CYGWINGCC_IA32_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h ################## # X64 definitions @@ -476,7 +476,7 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT *_CYGWINGCC_X64_PP_PATH = DEF(CYGWIN_BINX64)/gcc *_CYGWINGCC_X64_VFRPP_PATH = DEF(CYGWIN_BINX64)/gcc -*_CYGWINGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h -D_EFI_P64 +*_CYGWINGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -mno-red-zone -Wall -Werror -c -include AutoGen.h -D_EFI_P64 #################################################################################### #