aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorKumar Gala <kumar.gala@linaro.org>2020-06-26 11:36:34 -0500
committerTamas Ban <tamas.ban@arm.com>2020-07-02 18:55:01 +0000
commit589274394942a219e3d03e023ed41f5a47dcee6d (patch)
treefb06c642750eb01ab8e4e6aecde92830fc1a87eb /cmake
parent190dbaac9c5d6103c01df0c4f2b61715f8b7213d (diff)
downloadtrusted-firmware-m-589274394942a219e3d03e023ed41f5a47dcee6d.tar.gz
Build: Fix determing GNUARM_PREFIX on windows
We extract the GNUARM_PREFIX from CMAKE_C_COMPILER. On windows that will be something like arm-none-eabi-gcc.exe. So the existing string manipulation would turn that into arm-none-eabi.exe. We need to strip off the .exe as well for this to work correct on windows as well. Change-Id: I98b0d6bb000433f267080147f83d527b9f36ca12 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Compiler/GNUARM.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/Compiler/GNUARM.cmake b/cmake/Compiler/GNUARM.cmake
index fc9db7a0d..8fbd97bbb 100644
--- a/cmake/Compiler/GNUARM.cmake
+++ b/cmake/Compiler/GNUARM.cmake
@@ -18,6 +18,7 @@ set(CMAKE_EXECUTABLE_SUFFIX ".axf")
if(NOT DEFINED GNUARM_PREFIX)
get_filename_component(__c_bin ${CMAKE_C_COMPILER} NAME)
string(REPLACE "-gcc" "" GNUARM_PREFIX ${__c_bin})
+ string(REPLACE ".exe" "" GNUARM_PREFIX ${GNUARM_PREFIX})
endif()
find_program(CMAKE_GNUARM_LINKER ${GNUARM_PREFIX}-gcc HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )