From 22eacbafcdec361542194ab17683c1857bc84140 Mon Sep 17 00:00:00 2001 From: AtomicFS Date: Thu, 26 Sep 2024 17:18:40 +0200 Subject: [PATCH] fix(edk2): toolchain GCC5 was depreciated in edk2-stable202305 Signed-off-by: AtomicFS --- tests/test_edk2.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_edk2.sh b/tests/test_edk2.sh index 31501f85..ef2359ff 100755 --- a/tests/test_edk2.sh +++ b/tests/test_edk2.sh @@ -54,5 +54,14 @@ fi if [ "${VERIFICATION_TEST_EDK2_VERSION}" == "UDK2017" ]; then OvmfPkg/build.sh -a X64 else - build -D BOOTLOADER=COREBOOT -a IA32 -a X64 -t GCC5 -b DEBUG -p "${PAYLOAD}" -D BUILD_ARCH=X64 + # GCC5 is deprecated since edk2-stable202305 + # For more information see https://github.com/9elements/firmware-action/issues/340 + CURRENT_VERSION=$( echo "${VERIFICATION_TEST_EDK2_VERSION}" | tr -cd '0-9' ) + if [ "${CURRENT_VERSION}" -ge "$( echo 'edk2-stable202305' | tr -cd '0-9' )" ]; then + echo "edk2-stable202305 or newer" + build -D BOOTLOADER=COREBOOT -a IA32 -a X64 -t GCC -b DEBUG -p "${PAYLOAD}" -D BUILD_ARCH=X64 + else + echo "older than edk2-stable202305" + build -D BOOTLOADER=COREBOOT -a IA32 -a X64 -t GCC5 -b DEBUG -p "${PAYLOAD}" -D BUILD_ARCH=X64 + fi fi