From c261c27dcee4603b9628d68639e7dccc4253af7e Mon Sep 17 00:00:00 2001 From: Michael Kinney Date: Mon, 22 Feb 2016 16:46:06 -0800 Subject: BaseTools/tools_def.txt: Add -march=i586 for IA32 GCC targets Newer GCC compilers use a default of march higher than i586 for -m32 (IA32 configuration) and this is causing generation of instructions that are not compatible with all IA32 targets. Specically Galileo platform support in the QuarkPlatformPkg does not boot if GCC48 or higher is used. This is similar to the following checkin that was done to address this same issue for VS2012 and higher tool chains: SHA-1: 71028ba2c4c398d70475504e671d048d9003d90f Cc: Yonghong Zhu Cc: Liming Gao Cc: Leroy Leahy Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Liming Gao --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Conf') diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index c42a434165..b1577af8c8 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1,6 +1,6 @@ # # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
# @@ -4351,7 +4351,7 @@ DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm 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-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables +DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large -fno-asynchronous-unwind-tables DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z common-page-size=0x20 DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable -- cgit v1.2.3