From nobody Thu May 2 15:20:20 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+82049+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+82049+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.de ARC-Seal: i=1; a=rsa-sha256; t=1634238387; cv=none; d=zohomail.com; s=zohoarc; b=QBOOFBWHIhG/2tljEbIOIA9EU1frKag2aIymAIpdihvTftQdBcd+Swe/H1w8vONNYuBx1X6LcnJJA9PpyE0kbv71IoXy1Za45SYP16zLobj0zbn3HyCRLjn3XKFxE8yxaSnKBQW2tB5eW3c1qwTQvrea4yxmcxfx3MsQr2lvY5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634238387; 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=lGzZlrPHMJffYuof6dHPjufYZYQRMbBe2RJqc8OuQ+8=; b=asF9RH7d/G+zyTQGFNLsm9aZG7hxy2L0obNwiwQEBtx1L4+Gfi521JJRfaQkiL1dsaG49eFeEMm8DSI5wa7IyuYww5sM5xl+nxQnBq2pvtHWfw8YFWRWcLTqh84g7UjcwCMcrNopRS2UdmgMTjpq2gMR5TnSoiTdujFe8rdveks= 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+82049+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 1634238387882751.3058197405092; Thu, 14 Oct 2021 12:06:27 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IKloYY1788612xiEgQtiWFv7; Thu, 14 Oct 2021 12:06:27 -0700 X-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web10.1657.1634238386010062125 for ; Thu, 14 Oct 2021 12:06:26 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CFD8B240115 for ; Thu, 14 Oct 2021 21:06:22 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HVf553hntz6tmG; Thu, 14 Oct 2021 21:06:17 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh , Vitaly Cheptsov , Steven Shi , Jiyang Yang Subject: [edk2-devel] [PATCH v2 1/1] StandaloneMmPkg: Support CLANGPDB builds Date: Thu, 14 Oct 2021 19:05:48 +0000 Message-Id: <50b75bf3cb8e49f74b5522c68fc6d4d9d48f2998.1634238146.git.mhaeuser@posteo.de> In-Reply-To: References: 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: HZQHSLId4owDZmNr16jlJ8jIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634238387; bh=FMJ0rFQ7d7Mklr6Dsl8TrzXkywQoSGHlxWO+XuOwQIg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=l/LpDLsceNvUg0vEcayOKzCzm28QCfbMtEJpGzzccBLxUVonXWxmko2nV0COIfPtL7G NB3W2sDx2jZAt13VIgCNaqzZUiGb4f9XlpXj11+W+61I4GWtfx7o05AiM5OR9iChriLj2 7E4HShdTWNv9uvJ0gv74vojp4j3ElR+4gFs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634238388504100002 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 ARM-specific self-relocation, drop it for other architectures and document the limitation to enable e.g. X64 CLANGPDB builds of StandaloneMmCore. Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Jiewen Yao Cc: Supreeth Venkatesh Cc: Vitaly Cheptsov Cc: Steven Shi Cc: Jiyang Yang Signed-off-by: Marvin H=C3=A4user Acked-by: Shi Steven --- StandaloneMmPkg/Core/StandaloneMmCore.inf = | 12 ++++++++++-- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPo= int.inf | 9 ++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Co= re/StandaloneMmCore.inf index 56042b7b39f4..c44b9ff33303 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -76,6 +76,14 @@ [Guids] gEfiEventExitBootServicesGuid gEfiEventReadyToBootGuid =20 +# +# This configuration fails for CLANGPDB, which does not support PIE in the= GCC +# sense. Such however is required for ARM family StandaloneMmCore +# self-relocation, and thus the CLANGPDB toolchain is unsupported for ARM = and +# AARCH64 for this module. +# [BuildOptions] - GCC:*_*_*_CC_FLAGS =3D -fpie - GCC:*_*_*_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie + GCC:*_*_ARM_CC_FLAGS =3D -fpie + GCC:*_*_ARM_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 1762586cfa02..75cfb98c0e75 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf @@ -54,5 +54,12 @@ [Guids] [FeaturePcd.ARM, FeaturePcd.AARCH64] gArmTokenSpaceGuid.PcdFfaEnable =20 +# +# This configuration fails for CLANGPDB, which does not support PIE in the= GCC +# sense. Such however is required for ARM family StandaloneMmCore +# self-relocation, and thus the CLANGPDB toolchain is unsupported for ARM = and +# AARCH64 for this module. +# [BuildOptions] - GCC:*_*_*_CC_FLAGS =3D -fpie + GCC:*_*_ARM_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 (#82049): https://edk2.groups.io/g/devel/message/82049 Mute This Topic: https://groups.io/mt/86322444/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-