diff --git a/platforms/linux/riscv-gnu.toolchain.cmake b/platforms/linux/riscv-gnu.toolchain.cmake index 662fb6bddb..1657bd1681 100644 --- a/platforms/linux/riscv-gnu.toolchain.cmake +++ b/platforms/linux/riscv-gnu.toolchain.cmake @@ -25,22 +25,22 @@ if(NOT DEFINED TOOLCHAIN_COMPILER_LOCATION_HINT) endif() if(NOT DEFINED CMAKE_C_COMPILER) - find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}-gcc${__GCC_VER_SUFFIX} ${TOOLCHAIN_COMPILER_LOCATION_HINT}) + find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}-gcc${__GCC_VER_SUFFIX} PATHS ${TOOLCHAIN_COMPILER_LOCATION_HINT}) else() #message(WARNING "CMAKE_C_COMPILER=${CMAKE_C_COMPILER} is defined") endif() if(NOT DEFINED CMAKE_CXX_COMPILER) - find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}-g++${__GCC_VER_SUFFIX} ${TOOLCHAIN_COMPILER_LOCATION_HINT}) + find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}-g++${__GCC_VER_SUFFIX} PATHS ${TOOLCHAIN_COMPILER_LOCATION_HINT}) else() #message(WARNING "CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} is defined") endif() if(NOT DEFINED CMAKE_LINKER) - find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ld ${TOOLCHAIN_COMPILER_LOCATION_HINT}) + find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ld PATHS ${TOOLCHAIN_COMPILER_LOCATION_HINT}) else() #message(WARNING "CMAKE_LINKER=${CMAKE_LINKER} is defined") endif() if(NOT DEFINED CMAKE_AR) - find_program(CMAKE_AR NAMES ${GNU_MACHINE}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ar ${TOOLCHAIN_COMPILER_LOCATION_HINT}) + find_program(CMAKE_AR NAMES ${GNU_MACHINE}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ar PATHS ${TOOLCHAIN_COMPILER_LOCATION_HINT}) else() #message(WARNING "CMAKE_AR=${CMAKE_AR} is defined") endif()