From eae4d3cf749cae6c8f322f5af9b5479ea6fdd9bf Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Feb 2022 08:09:43 -0500 Subject: [PATCH 1/2] fixup armhf target --- cmake/StaticBuild.cmake | 3 +++ contrib/cross/armhf.toolchain.cmake | 1 + 2 files changed, 4 insertions(+) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 7e63d55bd..4e0bdc06f 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -253,6 +253,9 @@ if(CMAKE_CROSSCOMPILING) elseif(ARCH_TRIPLET STREQUAL aarch64-linux-gnu) # cross compile arm64 set(openssl_system_env SYSTEM=Linux MACHINE=aarch64) + elseif(ARCH_TRIPLET MATCHES arm-linux) + # cross compile armhf + set(openssl_system_env SYSTEM=Linux MACHINE=armv4) endif() elseif(CMAKE_C_FLAGS MATCHES "-march=armv7") # Help openssl figure out that we're building from armv7 even if on armv8 hardware: diff --git a/contrib/cross/armhf.toolchain.cmake b/contrib/cross/armhf.toolchain.cmake index aba32f0f2..552975e6d 100644 --- a/contrib/cross/armhf.toolchain.cmake +++ b/contrib/cross/armhf.toolchain.cmake @@ -10,3 +10,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc${TOOLCHAIN_SUFFIX}) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++${TOOLCHAIN_SUFFIX}) +set(ARCH_TRIPLET ${TOOLCHAIN_PREFIX}) From 48559bd282e047ec3b06b090eea08a80923a5923 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Feb 2022 08:34:58 -0500 Subject: [PATCH 2/2] fix up ppc64le cross target --- cmake/StaticBuild.cmake | 3 +++ contrib/cross/ppc64le.toolchain.cmake | 1 + 2 files changed, 4 insertions(+) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 4e0bdc06f..fca5967f2 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -256,6 +256,9 @@ if(CMAKE_CROSSCOMPILING) elseif(ARCH_TRIPLET MATCHES arm-linux) # cross compile armhf set(openssl_system_env SYSTEM=Linux MACHINE=armv4) + elseif(ARCH_TRIPLET MATCHES powerpc64le) + # cross compile ppc64le + set(openssl_system_env SYSTEM=Linux MACHINE=ppc64le) endif() elseif(CMAKE_C_FLAGS MATCHES "-march=armv7") # Help openssl figure out that we're building from armv7 even if on armv8 hardware: diff --git a/contrib/cross/ppc64le.toolchain.cmake b/contrib/cross/ppc64le.toolchain.cmake index d817c869a..f0b956079 100644 --- a/contrib/cross/ppc64le.toolchain.cmake +++ b/contrib/cross/ppc64le.toolchain.cmake @@ -10,3 +10,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc${TOOLCHAIN_SUFFIX}) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++${TOOLCHAIN_SUFFIX}) +set(ARCH_TRIPLET ${TOOLCHAIN_PREFIX})