diff --git a/tests/test_edk2.sh b/tests/test_edk2.sh index 31501f85..edd05e54 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 depreciated 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