From 7da9028ca3f7f55de360c60b3f37b35141d48c1d Mon Sep 17 00:00:00 2001 From: Tuan Phan Date: Tue, 20 Jan 2026 20:32:31 -0800 Subject: [PATCH] MdePkg: CompilerIntrinsicsLib: Add RiscV64 support Add memcpy/memset implementations for RiscV64 as they may be required by compiler during linking when build with the -Os flag. Signed-off-by: Tuan Phan --- MdePkg/MdeLibs.dsc.inc | 8 ++++---- MdePkg/MdePkg.dsc | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc index b063480df7..91cf2aa3c4 100644 --- a/MdePkg/MdeLibs.dsc.inc +++ b/MdePkg/MdeLibs.dsc.inc @@ -60,12 +60,12 @@ # implements exception handling for SEC and PEI_CORE, it can use StackCheckLib for these phases in its DSC. StackCheckLib|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf -[LibraryClasses.AARCH64] +[LibraryClasses.AARCH64, LibraryClasses.RISCV64] # - # It is not possible to prevent the AARCH64 compilers from inserting generic intrinsic functions. - # This library provides the intrinsic functions generated by these compilers. + # It is not possible to prevent compilers from inserting generic intrinsic functions. + # This library provides the intrinsic functions generated by compilers. # - # Linking this here as a null library will cause all AARCH64 files to link against it and have + # Linking this here as a null library will cause all files to link against it and have # definitions for the intrinsic functions. # NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index f58b887d25..cfdd76463c 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -217,6 +217,7 @@ MdePkg/Library/PeiServicesTablePointerLibRiscV/PeiServicesTablePointerLib.inf MdePkg/Library/DxeRiscvMpxyLib/DxeRiscvMpxy.inf MdePkg/Library/DxeRiscvRasAgentClientLib/DxeRiscvRasAgentClientLib.inf + MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [Components.LOONGARCH64] MdePkg/Library/PeiServicesTablePointerLibKs0/PeiServicesTablePointerLibKs0.inf