From nobody Fri May 3 19:55:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+78894+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78894+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.de ARC-Seal: i=1; a=rsa-sha256; t=1628451642; cv=none; d=zohomail.com; s=zohoarc; b=M4zxmhPU/JEPyjftuD8Ww2KYGCRmcHVLYWiTEGTtqFQULAQgfuG4wrZM8MS4tGl4LU+aRINDkwi47iDEco9wv+vwcp8Yu8njUsAOSOfsKEiYdooVxWW4iVRZs4diKdjLj4Z5Ck1nhF64X/u7RyIOYvky50F5TIoIzEAGt2OqAMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628451642; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=GYrB/66sFogH4kSO//gEGuqr+EwAyadXW8zTH8DpYw4=; b=B8sG6xJzkqws4tOcn9FUs1MTd/neDEjfQN7zMzywpUkN2QkSKjAuxgUUlTc6PyXfE1K/9ZFGUP2guyFDTwhxaKNN4vrwGi42SCm1gSg7fJp9imGaJHaEraeaTQIjR9Rn7RCLIsYTxZhlSCWa7rhwU/urKZP1UU4qMtD0ayBhptA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78894+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1628451642952300.0113637163671; Sun, 8 Aug 2021 12:40:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 61cWYY1788612xclr9UdVHMj; Sun, 08 Aug 2021 12:40:42 -0700 X-Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web10.13766.1628451641152513237 for ; Sun, 08 Aug 2021 12:40:41 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 9B03F240027 for ; Sun, 8 Aug 2021 21:40:39 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjV1f6tz3z6tm6; Sun, 8 Aug 2021 21:40:38 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh , Vitaly Cheptsov Subject: [edk2-devel] [PATCH] StandaloneMmPkg: Support CLANGPDB X64 builds Date: Sun, 8 Aug 2021 19:39:52 +0000 Message-Id: In-Reply-To: <5df11a13422732b9c03c120775a2b4dd0a49182f.1628444003.git.mhaeuser@posteo.de> References: <5df11a13422732b9c03c120775a2b4dd0a49182f.1628444003.git.mhaeuser@posteo.de> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mhaeuser@posteo.de X-Gm-Message-State: ov6yG5HjzJX2RD4c4XfZVvBTx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628451642; bh=/lt8YF9Kjf/CWgoJ5Oe0Qo2iY0dWYhoulfXWoZuj5Qs=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=NOSPK8S4kfxQO5d4T4KfavecS52SXJ2wTvQnoVkC/lnWknhgLi4C5BULQ9g0h0EwJ+G 4AqAVAkRu96CJL4tilv5m18NFRdTDk05LGnCU7DAkv9BnEZBA0Zs6DfsNT8vb43PwFNIr s6omilelSse6k8B1DHK6hQax/kgbB8n7lbw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628451643895100068 Content-Type: text/plain; charset="utf-8" Currently, the flag "-fpie" is passed for all builds with a GCC family toolchain, including CLANGPDB. CLANGPDB however does not support this flag as it generates PE/COFF files directly. As the flag is mostly required for AArch64-specific self-relocation, drop it for X64 builds and document the limitation to enable X64 CLANGPDB builds of StandaloneMmCore. Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Jiewen Yao Cc: Supreeth Venkatesh Cc: Vitaly Cheptsov Signed-off-by: Marvin H=C3=A4user --- StandaloneMmPkg/Core/StandaloneMmCore.inf = | 9 +++++++-- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPo= int.inf | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Co= re/StandaloneMmCore.inf index 87bf6e9440a7..e3349fff29cc 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -76,6 +76,11 @@ [Guids] gEfiEventExitBootServicesGuid gEfiEventReadyToBootGuid =20 +# +# This configuration fails for CLANGPDB, which does not support PIE in the= GCC +# sense. Such however is required for AArch64 StandaloneMmCore self-reloca= tion, +# and thus the CLANGPDB toolchain is unsupported for AArch64 for this modu= le. +# [BuildOptions] - GCC:*_*_*_CC_FLAGS =3D -fpie - GCC:*_*_*_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie + GCC:*_*_AARCH64_CC_FLAGS =3D -fpie + GCC:*_*_AARCH64_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM= mCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/St= andaloneMmCoreEntryPoint.inf index 4fa426f58ef4..dcbb082d4ab8 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf @@ -54,5 +54,10 @@ [Guids] [FeaturePcd.AARCH64] gArmTokenSpaceGuid.PcdFfaEnable =20 +# +# This configuration fails for CLANGPDB, which does not support PIE in the= GCC +# sense. Such however is required for AArch64 StandaloneMmCore self-reloca= tion, +# and thus the CLANGPDB toolchain is unsupported for AArch64 for this modu= le. +# [BuildOptions] - GCC:*_*_*_CC_FLAGS =3D -fpie + GCC:*_*_AARCH64_CC_FLAGS =3D -fpie --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78894): https://edk2.groups.io/g/devel/message/78894 Mute This Topic: https://groups.io/mt/84754068/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-