From nobody Fri Apr 26 16:45:57 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1495657583618772.54504993074; Wed, 24 May 2017 13:26:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 680FA219FFEF1; Wed, 24 May 2017 13:26:21 -0700 (PDT) Received: from complete.lackof.org (complete.lackof.org [198.49.126.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9600121969F85 for ; Wed, 24 May 2017 13:26:19 -0700 (PDT) Received: from localhost (unknown [104.132.1.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by complete.lackof.org (Postfix) with ESMTPSA id ACBF733E029C; Wed, 24 May 2017 14:26:18 -0600 (MDT) X-Original-To: edk2-devel@lists.01.org Date: Wed, 24 May 2017 13:26:18 -0700 From: dann frazier To: Ard Biesheuvel , Leif Lindholm Message-ID: <20170524202618.kgxxlewemfn4rpho@xps13.dannf> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170306 (1.8.0) X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on complete.lackof.org Subject: [edk2] [PATCH v2] BaseTools/GCC ARM/AARCH64: Force disable PIE X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edk2-devel@lists.01.org, Liming Gao Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" v2: * Replace -no-pie w/ -static for compat with GCC 4.9 After Debian's toolchain switched to PIE by default, our edk2 builds began to fail to build (GCC49 w/ gcc 6.3). This patch fixes the build by forcing off PIE for both ARM and AARCH64 builds. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: dann frazier --- BaseTools/Conf/tools_def.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 4b1b7b548c..fc0bf2ff70 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4339,14 +4339,14 @@ DEFINE GCC_ALL_CC_FLAGS =3D -g -Os -fsho= rt-wchar -fno-builtin -fno-stri DEFINE GCC_IA32_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -m32 -malign-= double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-p= robe DEFINE GCC_X64_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -mno-red-zone= -Wno-address -mno-stack-arg-probe DEFINE GCC_IPF_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -minline-int-= divide-min-latency -DEFINE GCC_ARM_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -mlittle-endi= an -mabi=3Daapcs -fno-short-enums -funsigned-char -ffunction-sections -fdat= a-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=3Dsoft +DEFINE GCC_ARM_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -mlittle-endi= an -mabi=3Daapcs -fno-short-enums -funsigned-char -ffunction-sections -fdat= a-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=3Dsoft -fn= o-pie DEFINE GCC_ARM_CC_XIPFLAGS =3D -mno-unaligned-access -DEFINE GCC_AARCH64_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -mlittle-endi= an -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fda= ta-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic +DEFINE GCC_AARCH64_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -mlittle-endi= an -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fda= ta-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie DEFINE GCC_AARCH64_CC_XIPFLAGS =3D -mstrict-align DEFINE GCC_DLINK_FLAGS_COMMON =3D -nostdlib --pie DEFINE GCC_DLINK2_FLAGS_COMMON =3D -Wl,--script=3D$(EDK_TOOLS_PATH)/Sc= ripts/GccBase.lds DEFINE GCC_IA32_X64_DLINK_COMMON =3D DEF(GCC_DLINK_FLAGS_COMMON) --gc-se= ctions -DEFINE GCC_ARM_AARCH64_DLINK_COMMON=3D -Wl,--emit-relocs -nostdlib -Wl,--g= c-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_= DIR_DEBUG)/$(BASE_NAME).map +DEFINE GCC_ARM_AARCH64_DLINK_COMMON=3D -Wl,--emit-relocs -nostdlib -Wl,--g= c-sections -static -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map= ,$(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ARM_DLINK_FLAGS =3D DEF(GCC_ARM_AARCH64_DLINK_COMMON) -= z common-page-size=3D0x20 DEFINE GCC_AARCH64_DLINK_FLAGS =3D DEF(GCC_ARM_AARCH64_DLINK_COMMON) -= z common-page-size=3D0x20 DEFINE GCC_IA32_X64_ASLDLINK_FLAGS =3D DEF(GCC_IA32_X64_DLINK_COMMON) --en= try _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel