rustdesk/res/vcpkg/0001-Extend-crosscompiling-efforts-to-other-architectures.patch

54 lines
2.4 KiB
Diff
Raw Normal View History

From 4f03e584befa8ccee59eb6e8556a11d968f1785f Mon Sep 17 00:00:00 2001
From: Vasyl Gello <vasek.gello@gmail.com>
Date: Mon, 13 Nov 2023 05:30:49 +0000
Subject: [PATCH] Extend crosscompiling efforts to other architectures
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
---
scripts/toolchains/linux.cmake | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake
index f19940b..f22c710 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()
--
2.40.1