The MRC use the memset() in the code and assume the compiler to offer such builtin fuctions. Add work around to permit compiler add builtin functions in this module. Also MRC mix some inline assembly, e.g. asm("rdtsc":"=a"(tscL),"=d"(tscH)),in the C code, and CLANG38 could wrongly remove them if enable LTO with high optimization level. Add work around to simply disable the LTO in this module.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi <steven....@intel.com> --- QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf diff --git a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf old mode 100644 new mode 100755 index 78821f5..f593ef1 --- a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf +++ b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf @@ -38,6 +38,9 @@ GCC:RELEASE_*_*_CC_FLAGS = -DNDEBUG -DGCC -Wno-unused-function INTEL:RELEASE_*_*_CC_FLAGS = /D NDEBUG MSFT:RELEASE_*_*_CC_FLAGS = /D NDEBUG + GCC:*_CLANG38_IA32_CC_FLAGS = -fno-lto -fbuiltin + GCC:*_CLANGSCAN38_IA32_CC_FLAGS = -fno-lto -fbuiltin + GCC:*_GCC53_IA32_CC_FLAGS = -fbuiltin [Sources] memory_options.h -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel