Build: Add a check against GNUARM 10-2020-q4-major
GNU Arm compiler version 10-2020-q4-major has an issue in CMSE support.
Add a check against this version in toolchain_GNUARM.cmake to prevent
users from using this version by mistake.
Change-Id: I2540a291546ca024fca646a6e81f5679627d0cab
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
index 78705c4..760a098 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -102,6 +102,12 @@
tfm_toolchain_reset_compiler_flags()
tfm_toolchain_reset_linker_flags()
+ if (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.2.1)
+ message(FATAL_ERROR "GNU Arm compiler version 10-2020-q4-major has an issue in CMSE support."
+ " Select other GNU Arm compiler versions instead."
+ " See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99157 for the issue detail.")
+ endif()
+
unset(CMAKE_C_FLAGS_INIT)
unset(CMAKE_ASM_FLAGS_INIT)