Acked-by: Shi Steven <steven....@intel.com>

Hello Ard,
Could you review and check-in this patch? It blocks our clang build.


Thanks
Steven Shi


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin
> Häuser
> Sent: Friday, October 15, 2021 3:06 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>; Sami Mujawar
> <sami.muja...@arm.com>; Yao, Jiewen <jiewen....@intel.com>; Supreeth
> Venkatesh <supreeth.venkat...@arm.com>; Vitaly Cheptsov
> <vit9...@protonmail.com>; Shi, Steven <steven....@intel.com>; Yang,
> JiyangX <jiyangx.y...@intel.com>
> Subject: [edk2-devel] [PATCH v2 1/1] StandaloneMmPkg: Support
> CLANGPDB builds
> 
> 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 <ardb+tianoc...@kernel.org>
> Cc: Sami Mujawar <sami.muja...@arm.com>
> Cc: Jiewen Yao <jiewen....@intel.com>
> Cc: Supreeth Venkatesh <supreeth.venkat...@arm.com>
> Cc: Vitaly Cheptsov <vit9...@protonmail.com>
> Cc: Steven Shi <steven....@intel.com>
> Cc: Jiyang Yang <jiyangx.y...@intel.com>
> Signed-off-by: Marvin Häuser <mhaeu...@posteo.de>
> ---
>  StandaloneMmPkg/Core/StandaloneMmCore.inf                                    
>      | 12
> ++++++++++--
> 
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmC
> oreEntryPoint.inf |  9 ++++++++-
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf
> b/StandaloneMmPkg/Core/StandaloneMmCore.inf
> index 56042b7b39f4..c44b9ff33303 100644
> --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf
> +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf
> @@ -76,6 +76,14 @@ [Guids]
>    gEfiEventExitBootServicesGuid
> 
>    gEfiEventReadyToBootGuid
> 
> 
> 
> +#
> 
> +# 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 = -fpie
> 
> -  GCC:*_*_*_DLINK_FLAGS = -Wl,-z,text,-Bsymbolic,-pie
> 
> +  GCC:*_*_ARM_CC_FLAGS = -fpie
> 
> +  GCC:*_*_ARM_DLINK_FLAGS = -Wl,-z,text,-Bsymbolic,-pie
> 
> +  GCC:*_*_AARCH64_CC_FLAGS = -fpie
> 
> +  GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,-z,text,-Bsymbolic,-pie
> 
> diff --git
> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf
> index 1762586cfa02..75cfb98c0e75 100644
> ---
> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf
> +++
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf
> @@ -54,5 +54,12 @@ [Guids]
>  [FeaturePcd.ARM, FeaturePcd.AARCH64]
> 
>    gArmTokenSpaceGuid.PcdFfaEnable
> 
> 
> 
> +#
> 
> +# 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 = -fpie
> 
> +  GCC:*_*_ARM_CC_FLAGS = -fpie
> 
> +  GCC:*_*_AARCH64_CC_FLAGS = -fpie
> 
> --
> 2.31.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82189): https://edk2.groups.io/g/devel/message/82189
Mute This Topic: https://groups.io/mt/86322444/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to