diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index f19940b453cca7..f22c7107682fb9 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -13,7 +13,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") string(APPEND VCPKG_LINKER_FLAGS " -m32") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(CMAKE_SYSTEM_PROCESSOR armv7l CACHE STRING "") - if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") if(NOT DEFINED CMAKE_CXX_COMPILER) set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++") endif() @@ -25,12 +25,12 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") endif() if(NOT DEFINED CMAKE_ASM-ATT_COMPILER) set(CMAKE_ASM-ATT_COMPILER "arm-linux-gnueabihf-as") - endif() - message(STATUS "Cross compiling arm on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() + message(STATUS "Cross compiling arm on host ${CMAKE_HOST_SYSTEM_PROCESSOR}, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") endif() elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE STRING "") - if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") if(NOT DEFINED CMAKE_CXX_COMPILER) set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++") endif() @@ -42,8 +42,8 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") endif() if(NOT DEFINED CMAKE_ASM-ATT_COMPILER) set(CMAKE_ASM-ATT_COMPILER "aarch64-linux-gnu-as") - endif() - message(STATUS "Cross compiling arm64 on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() + message(STATUS "Cross compiling arm64 on host ${CMAKE_HOST_SYSTEM_PROCESSOR}, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") endif() endif()