Hi all,
Do you meet this issue when build edk2? If I just build edk2 with DEBUG mode, it's fine. If I build edk2 with RELEASE mode, I'll meet the issue in below.
"aarch64-linux-gnu-gcc" -o /opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/CapsuleRuntimeD xe/CapsuleRuntimeDxe/DEBUG/CapsuleRuntimeDxe.dll -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u _ModuleEntryPoint -Wl,-e,_ModuleEntryPoint ,-Map,/opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/ DEBUG/CapsuleRuntimeDxe.map -z common-page-size=0x20 -flto -Os -L/opt/workspace/boot/uefi/hikey960/edk2/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -z common-page-size=0x10000 -Wl,--start-group,@/opt/workspace/boot/uefi/hikey960/edk2/Build/HiK$y960/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/static_library_files.lst,--end-group -I/opt/wo$kspace/boot/uefi/hikey960/edk2/OpenPlatformPkg/Include -I/opt/workspace/boot/uefi/hikey960/edk2/OpenPlatformPkg/Platforms/Hisilicon/HiKey96$/Include -I/opt/workspace/boot/uefi/hikey960/edk2/EmbeddedPkg/Include -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=CapsuleRuntimeDxeStrings -g -Os -fshort-wchar -fno-s$rict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -fno-builtin -Wno-address -fno-asynchronous-unwind-tables -save-temps -flto -Wno-unused-but-set-variabl$ -mcmodel=tiny -fomit-frame-pointer -Wl,--script=/opt/workspace/boot/uefi/hikey960/edk2/BaseTools/Scripts/GccBase.lds -Wl,--defsym=PECOFF_H$ADER_SIZE=0x228 -Wno-error ArmPlatformPrePiUniCore.dll.ltrans0.ltrans.o: In function `ExtractGuidedSectionLibConstructor': /opt/workspace/boot/uefi/hikey960/edk2/EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.c:219: undefined refer$ nce to `memcpy' ArmPlatformPrePiUniCore.dll.ltrans6.ltrans.o: In function `GetSavedData': /opt/workspace/boot/uefi/hikey960/edk2/EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.c:37: undefined refere$ce to `memcpy' collect2: error: ld returned 1 exit status GNUmakefile:416: recipe for target '/opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/ArmPlatformPkg/PrePi/PeiUniC$re/DEBUG/ArmPlatformPrePiUniCore.dll' failed make: *** [/opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/ArmPlatformPkg/PrePi/PeiUniCore/DEBUG/ArmPlatformPreP$UniCore.dll] Error 1
build.py... : error 7000: Failed to execute command make tbuild [/opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/ArmPlatformPkg/PrePi/PeiUniCore]
build.py... : error 7000: Failed to execute command make tbuild [/opt/workspace/boot/uefi/hikey960/edk2/Build/HiKey960/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/SecurityStubDxe/Secu$ityStubDxe]
build.py... : error F002: Failed to build module
/opt/workspace/boot/uefi/hikey960/edk2/ArmPlatformPkg/PrePi/PeiUniCore.inf [AARCH64, GCC5, RELEASE]
Best Regards Haojian