[boost] s390x support (#12535)

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
This commit is contained in:
Andrei Lebedev 2020-07-31 07:55:25 +02:00 committed by GitHub
parent ca93b65ade
commit 4da29fee9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

View File

@ -1,4 +1,5 @@
Source: boost-build
Version: 1.73.0-1
Version: 1.73.0
Port-Version: 2
Homepage: https://github.com/boostorg/build
Description: Boost.Build

View File

@ -2,7 +2,7 @@ include(vcpkg_common_functions)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x")
return()
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
return()

View File

@ -35,6 +35,12 @@ else()
list(APPEND B2_OPTIONS address-model=32)
endif()
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x")
list(APPEND B2_OPTIONS architecture=s390x)
else()
list(APPEND B2_OPTIONS architecture=x86)
endif()
if(APPLE)
list(APPEND B2_OPTIONS target-os=darwin toolset=clang)
elseif(WIN32)
@ -158,7 +164,6 @@ add_custom_target(boost ALL
--hash
-q
architecture=x86
threading=multi
debug-symbols=on

View File

@ -1,3 +1,3 @@
Source: boost-modular-build-helper
Version: 1.73.0
Port-Version: 2
Port-Version: 3

View File

@ -4,7 +4,7 @@ function(boost_modular_build)
if(NOT DEFINED _bm_SOURCE_PATH)
message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.")
endif()
# Next CMake variables may be overridden in the file specified in ${_bm_BOOST_CMAKE_FRAGMENT}
set(B2_OPTIONS)
set(B2_OPTIONS_DBG)
@ -21,7 +21,7 @@ function(boost_modular_build)
set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x64-linux/tools/boost-build")
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x")
get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
else()
set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build")
@ -29,7 +29,7 @@ function(boost_modular_build)
if(NOT EXISTS "${BOOST_BUILD_PATH}")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
message(FATAL_ERROR "The x64 boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:x64-linux`.")
message(FATAL_ERROR "The x64 boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:x64-linux`.")
else()
message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.")
endif()
@ -184,7 +184,7 @@ function(boost_modular_build)
-sZSTD_BINARY=zstdd
"-sZSTD_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib"
)
set(B2_OPTIONS_REL
-sZLIB_BINARY=zlib
"-sZLIB_LIBPATH=${CURRENT_INSTALLED_DIR}/lib"
@ -252,6 +252,8 @@ function(boost_modular_build)
list(APPEND B2_OPTIONS address-model=32 architecture=arm)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
list(APPEND B2_OPTIONS address-model=64 architecture=arm)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x")
list(APPEND B2_OPTIONS address-model=64 architecture=s390x)
else()
list(APPEND B2_OPTIONS address-model=32 architecture=x86)
endif()