Build: Add support for specifying GNUARM_PREFIX

Add support to allow for vendor specific GNU triplets that may not be
arm-none-eabi, but something like arm-<VENDOR>-eabi.

In cmake/Compiler/GNUARM.cmake we provide a means to extract the
compiler prefix from CMAKE_C_COMPILER as it will not always be set.  For
example when mbed-crypto's CMake is invoked from tfm, we'll eventually
source GNUARM.cmake and not have GNUARM_PREFIX set.  This provides a
means to handle such cases (otherwise we end up with NOTFOUND cache
entries for CMAKE_LINKER & CMAKE_AR.

Change-Id: I5b3f1a0ff1156b9eda6c540220aa99162b6fd813
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
diff --git a/cmake/Common/CompilerGNUARMCommon.cmake b/cmake/Common/CompilerGNUARMCommon.cmake
index be1ac8f..32e805b 100644
--- a/cmake/Common/CompilerGNUARMCommon.cmake
+++ b/cmake/Common/CompilerGNUARMCommon.cmake
@@ -32,13 +32,13 @@
 
 #Tell cmake which compiler we use
 if (EXISTS "c:/")
-	set (CMAKE_C_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-gcc.exe")
-	set (CMAKE_CXX_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-g++.exe")
-	set (CMAKE_ASM_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-gcc.exe")
+	set (CMAKE_C_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-gcc.exe")
+	set (CMAKE_CXX_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-g++.exe")
+	set (CMAKE_ASM_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-gcc.exe")
 else()
-	set (CMAKE_C_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-gcc")
-	set (CMAKE_CXX_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-g++")
-	set (CMAKE_ASM_COMPILER "${GNUARM_PATH}/bin/arm-none-eabi-gcc")
+	set (CMAKE_C_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-gcc")
+	set (CMAKE_CXX_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-g++")
+	set (CMAKE_ASM_COMPILER "${GNUARM_PATH}/bin/${GNUARM_PREFIX}-gcc")
 endif()
 
 if("CXX" IN_LIST languages)