Build: Add support for Armclang 6.10 and Armclang 6.11

This patch introduces support for building with Armclang 6.10
and Armclang 6.11. It also fixes a typo inside the cmake build
system files, and rename architecture names to be consistent.

Change-Id: I9b7db4751c225f092e84c85d9d421fa6d158c929
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/cmake/Common/CompilerArmClang67.cmake b/cmake/Common/CompilerArmClang67.cmake
index c4a5703..44b0029 100644
--- a/cmake/Common/CompilerArmClang67.cmake
+++ b/cmake/Common/CompilerArmClang67.cmake
@@ -13,9 +13,9 @@
 
 check_armclang_input_vars("6.7")
 
-if(NOT DEFINED ARM_CPU_ARHITECTURE)
-	set(_NO_ARM_CPU_ARHITECTURE true)
-elseif (${ARM_CPU_ARHITECTURE} STREQUAL "ARM8-M-BASE")
+if(NOT DEFINED ARM_CPU_ARCHITECTURE)
+	set(_NO_ARM_CPU_ARCHITECTURE true)
+elseif (${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv8-M.BASE")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "--target=" VAL "--target=arm-arm-none-eabi")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "-march=" VAL "-march=armv8-m.base")
 	#following is to work around an armclang compiler bug that is fixed in 6.10
@@ -24,14 +24,14 @@
 	string_append_unique_item(STRING CMAKE_CXX_FLAGS_CPU KEY "-march=" VAL "-march=armv8-m.base")
 	string_append_unique_item(STRING CMAKE_ASM_FLAGS_CPU KEY "--cpu=" VAL "--cpu=8-M.Base")
 	string_append_unique_item(STRING CMAKE_LINK_FLAGS_CPU KEY "--cpu=" VAL "--cpu=8-M.Base")
-elseif(${ARM_CPU_ARHITECTURE} STREQUAL "ARM8-M-MAIN")
+elseif(${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv8-M.MAIN")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "--target=" VAL "--target=arm-arm-none-eabi")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "-march=" VAL "-march=armv8-m.main")
 	string_append_unique_item(STRING CMAKE_CXX_FLAGS_CPU KEY "--target=" VAL "--target=arm-arm-none-eabi")
 	string_append_unique_item(STRING CMAKE_CXX_FLAGS_CPU KEY "-march=" VAL "-march=armv8-m.main")
 	string_append_unique_item(STRING CMAKE_ASM_FLAGS_CPU KEY "--cpu=" VAL "--cpu=8-M.Main")
 	string_append_unique_item(STRING CMAKE_LINK_FLAGS_CPU KEY "--cpu=" VAL "--cpu=8-M.Main")
-elseif(${ARM_CPU_ARHITECTURE} STREQUAL "V7-M")
+elseif(${ARM_CPU_ARCHITECTURE} STREQUAL "ARMv7-M")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "--target=" VAL "--target=arm-arm-none-eabi")
 	string_append_unique_item(STRING CMAKE_C_FLAGS_CPU KEY "-march=" VAL "-march=armv8-m")
 	string_append_unique_item(STRING CMAKE_CXX_FLAGS_CPU KEY "--target=" VAL "--target=arm-arm-none-eabi")
@@ -42,8 +42,8 @@
 	message(FATAL_ERROR "Unknown or unsupported ARM cpu architecture setting.")
 endif()
 
-#Prefer arhitecture definition over cpu type.
-if(NOT DEFINED ARM_CPU_ARHITECTURE)
+#Prefer architecture definition over cpu type.
+if(NOT DEFINED ARM_CPU_ARCHITECTURE)
 	if(NOT DEFINED ARM_CPU_TYPE)
 		string_append_unique_item(_NO_ARM_CPU_TYPE true)
 	elseif(${ARM_CPU_TYPE} STREQUAL "Cortex-M3")
@@ -68,6 +68,6 @@
 	endif()
 endif()
 
-if (_NO_ARM_CPU_TYPE AND _NO_ARM_CPU_ARHITECTURE)
+if (_NO_ARM_CPU_TYPE AND _NO_ARM_CPU_ARCHITECTURE)
 	message(FATAL_ERROR "Can not set CPU specific compiler flags: neither the ARM CPU type nor the architecture is set.")
 endif()