diff options
author | Marvin Häuser <mhaeuser@posteo.de> | 2021-10-14 19:05:48 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-10-18 13:32:39 +0000 |
commit | 210869834639c1150b1f016e2022472a55cdd884 (patch) | |
tree | e687d5eb3340e3b699934542bf56ddde5046c26a | |
parent | f10a112f08f3fb4a92c3d22f069f6066a12db3be (diff) | |
download | edk2-210869834639c1150b1f016e2022472a55cdd884.tar.gz edk2-210869834639c1150b1f016e2022472a55cdd884.tar.bz2 edk2-210869834639c1150b1f016e2022472a55cdd884.zip |
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.
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
Acked-by: Shi Steven <steven.shi@intel.com>
-rw-r--r-- | StandaloneMmPkg/Core/StandaloneMmCore.inf | 12 | ||||
-rw-r--r-- | StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf | 9 |
2 files changed, 18 insertions, 3 deletions
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
|