diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf index 56042b7b39..c44b9ff333 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -76,6 +76,14 @@ 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/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf index 1762586cfa..75cfb98c0e 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf @@ -54,5 +54,12 @@ [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