Add support for s390x, armhf and ppc64le
This commit is contained in:
parent
e79894be71
commit
d02a98b2fa
10
.github/workflows/platform_natives.yaml
vendored
10
.github/workflows/platform_natives.yaml
vendored
@ -16,12 +16,14 @@ jobs:
|
|||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/386", implementation: "tdlib"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/386", implementation: "tdlib"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlight"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlight"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlib"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlib"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v6", implementation: "tdlight"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/armhf", implementation: "tdlight"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v6", implementation: "tdlib"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/armhf", implementation: "tdlib"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v7", implementation: "tdlight"}
|
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v7", implementation: "tdlib"}
|
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlight"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlight"}
|
||||||
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlib"}
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlib"}
|
||||||
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/s390x", implementation: "tdlight"}
|
||||||
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/s390x", implementation: "tdlib"}
|
||||||
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/ppc64le", implementation: "tdlight"}
|
||||||
|
- {os: ubuntu-18.04, usedocker: "false", arch: "linux/ppc64le", implementation: "tdlib"}
|
||||||
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlight", triplet: "x64-windows-static"}
|
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlight", triplet: "x64-windows-static"}
|
||||||
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlib", triplet: "x64-windows-static"}
|
- {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlib", triplet: "x64-windows-static"}
|
||||||
- {os: macos-10.15, usedocker: "false", arch: "amd64", implementation: "tdlight"}
|
- {os: macos-10.15, usedocker: "false", arch: "amd64", implementation: "tdlight"}
|
||||||
|
@ -12,24 +12,22 @@ else
|
|||||||
export PCRE="r"
|
export PCRE="r"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GH_CPU_ARCH=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\4/g')
|
GH_CPU_ARCH=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|armhf|s390x)$/\2/g')
|
||||||
export GH_CPU_ARCH
|
export GH_CPU_ARCH
|
||||||
GH_OS_NAME=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^((linux)\/|(windows)\/|(macos)\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\3\4/g')
|
GH_OS_NAME=$(echo "$GH_MATRIX_OS" | sed -$PCRE 's/^(linux|ubuntu|windows|macos).*$/\1/g')
|
||||||
export GH_OS_NAME
|
if [[ $GH_OS_NAME == "ubuntu" ]]; then
|
||||||
|
GH_OS_NAME="linux"
|
||||||
if [[ -z "$GH_OS_NAME" ]]; then
|
|
||||||
GH_OS_NAME=$(echo "$GH_MATRIX_OS" | sed -$PCRE 's/^([^-]+).*$/\1/g')
|
|
||||||
export GH_OS_NAME
|
|
||||||
fi
|
fi
|
||||||
|
export GH_OS_NAME
|
||||||
|
|
||||||
if [[ "$GH_CPU_ARCH" == "arm64" ]]; then
|
if [[ "$GH_CPU_ARCH" == "arm64" ]]; then
|
||||||
export CPU_ARCHITECTURE_NAME="aarch64"
|
export CPU_ARCHITECTURE_NAME="aarch64"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$GH_CPU_ARCH" == "armv6" ]]; then
|
elif [[ "$GH_CPU_ARCH" == "armhf" ]]; then
|
||||||
export CPU_ARCHITECTURE_NAME="armv6"
|
export CPU_ARCHITECTURE_NAME="armhf"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$GH_CPU_ARCH" == "armv7" ]]; then
|
elif [[ "$GH_CPU_ARCH" == "s390x" ]]; then
|
||||||
export CPU_ARCHITECTURE_NAME="armv7"
|
export CPU_ARCHITECTURE_NAME="s390x"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$GH_CPU_ARCH" == "386" ]]; then
|
elif [[ "$GH_CPU_ARCH" == "386" ]]; then
|
||||||
export CPU_ARCHITECTURE_NAME="386"
|
export CPU_ARCHITECTURE_NAME="386"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
|
|
||||||
# Check variables correctness
|
# Check variables correctness
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
|
|
||||||
# Check variables correctness
|
# Check variables correctness
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | s390x | armhf | ppc64le>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
# BUILD_TYPE = <Debug | Release | RelWithDebInfo | MinSizeRel>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
@ -145,19 +145,19 @@ deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bioni
|
|||||||
cd "$ROOT_DIR"
|
cd "$ROOT_DIR"
|
||||||
{
|
{
|
||||||
echo "set(CMAKE_SYSTEM_PROCESSOR ${CPU_ARCH_CMAKE})";
|
echo "set(CMAKE_SYSTEM_PROCESSOR ${CPU_ARCH_CMAKE})";
|
||||||
echo "set(CMAKE_C_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-gcc)";
|
echo "set(CMAKE_C_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-gcc)";
|
||||||
echo "set(CMAKE_C_COMPILER_TARGET ${CLANG_TRIPLE})";
|
echo "set(CMAKE_C_COMPILER_TARGET ${CLANG_TRIPLE})";
|
||||||
echo "set(CMAKE_CXX_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-g++)";
|
echo "set(CMAKE_CXX_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-g++)";
|
||||||
echo "set(CMAKE_CXX_COMPILER_TARGET ${CLANG_TRIPLE})";
|
echo "set(CMAKE_CXX_COMPILER_TARGET ${CLANG_TRIPLE})";
|
||||||
echo "set(CMAKE_ASM_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-g++)";
|
echo "set(CMAKE_ASM_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-g++)";
|
||||||
echo "set(CMAKE_ASM_COMPILER_TARGET ${CLANG_TRIPLE})";
|
echo "set(CMAKE_ASM_COMPILER_TARGET ${CLANG_TRIPLE})";
|
||||||
echo "set(CMAKE_LIBRARY_PATH \"$CROSS_BUILD_DEPS_DIR/\")";
|
echo "set(CMAKE_LIBRARY_PATH \"$CROSS_BUILD_DEPS_DIR/\")";
|
||||||
#echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}\")";
|
#echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}\")";
|
||||||
#echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/\")";
|
#echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/\")";
|
||||||
echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-gnu/\")";
|
echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}/\")";
|
||||||
echo "include_directories(\"${CROSS_OPENJDK_PATH}/include\")";
|
echo "include_directories(\"${CROSS_OPENJDK_PATH}/include\")";
|
||||||
echo "include_directories(\"${CROSS_OPENJDK_PATH}/include/linux\")";
|
echo "include_directories(\"${CROSS_OPENJDK_PATH}/include/linux\")";
|
||||||
#echo "set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES \"$CROSS_BUILD_DEPS_DIR/usr/include/\" \"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-gnu/\")";
|
#echo "set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES \"$CROSS_BUILD_DEPS_DIR/usr/include/\" \"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}/\")";
|
||||||
|
|
||||||
echo "SET(CMAKE_FIND_ROOT_PATH \"$CROSS_BUILD_DEPS_DIR\" \"$JAVA_HOME\")";
|
echo "SET(CMAKE_FIND_ROOT_PATH \"$CROSS_BUILD_DEPS_DIR\" \"$JAVA_HOME\")";
|
||||||
#echo "SET(JAVA_HOME \"$CROSS_OPENJDK_PATH\")";
|
#echo "SET(JAVA_HOME \"$CROSS_OPENJDK_PATH\")";
|
||||||
@ -183,7 +183,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
EOF
|
EOF
|
||||||
if [[ ${CPU_ARCHITECTURE_NAME} == "aarch64" || ${CPU_ARCHITECTURE_NAME} == "armv6" || ${CPU_ARCHITECTURE_NAME} == "armv7" ]]; then
|
if [[ ${CPU_ARCHITECTURE_NAME} == "aarch64" || ${CPU_ARCHITECTURE_NAME} == "armhf" ]]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
||||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [[ "$CORE_VARIABLES_SET" == "YES" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "====== Setup variables ======"
|
echo "====== Setup variables ======"
|
||||||
if [[ "$OPERATING_SYSTEM_NAME" != "osx" ]]; then
|
if [[ "$OPERATING_SYSTEM_NAME" != "osx" ]]; then
|
||||||
echo "Current root directory:"
|
echo "Current root directory:"
|
||||||
@ -13,36 +17,42 @@ if [[ "$CPU_ARCHITECTURE_NAME" == "aarch64" ]]; then
|
|||||||
export CPU_ARCH_DPKG="arm64"
|
export CPU_ARCH_DPKG="arm64"
|
||||||
export CPU_ARCH_CMAKE="aarch64"
|
export CPU_ARCH_CMAKE="aarch64"
|
||||||
export CLANG_TRIPLE="aarch64-linux-gnu"
|
export CLANG_TRIPLE="aarch64-linux-gnu"
|
||||||
|
export CPU_COMPILATION_TOOL="gnu"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$CPU_ARCHITECTURE_NAME" == "armv6" ]]; then
|
elif [[ "$CPU_ARCHITECTURE_NAME" == "armhf" ]]; then
|
||||||
export CPU_ARCH_JAVA="armv6"
|
export CPU_ARCH_JAVA="armhf"
|
||||||
export CPU_ARCH_DPKG="armhf"
|
|
||||||
export CPU_ARCH_CMAKE="arm"
|
|
||||||
export CLANG_TRIPLE="arm-linux-gnu"
|
|
||||||
export CPU_CORES_NUM="2"
|
|
||||||
elif [[ "$CPU_ARCHITECTURE_NAME" == "armv7" ]]; then
|
|
||||||
export CPU_ARCH_JAVA="armv7"
|
|
||||||
export CPU_ARCH_DPKG="armhf"
|
export CPU_ARCH_DPKG="armhf"
|
||||||
export CPU_ARCH_CMAKE="arm"
|
export CPU_ARCH_CMAKE="arm"
|
||||||
export CLANG_TRIPLE="arm-linux-gnueabihf"
|
export CLANG_TRIPLE="arm-linux-gnueabihf"
|
||||||
|
export CPU_COMPILATION_TOOL="gnueabihf"
|
||||||
|
export CPU_CORES_NUM="2"
|
||||||
|
elif [[ "$CPU_ARCHITECTURE_NAME" == "s390x" ]]; then
|
||||||
|
export CPU_ARCH_JAVA="s390x"
|
||||||
|
export CPU_ARCH_DPKG="s390x"
|
||||||
|
export CPU_ARCH_CMAKE="s390x"
|
||||||
|
export CLANG_TRIPLE="s390x-linux-gnu"
|
||||||
|
export CPU_COMPILATION_TOOL="gnu"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$CPU_ARCHITECTURE_NAME" == "386" ]]; then
|
elif [[ "$CPU_ARCHITECTURE_NAME" == "386" ]]; then
|
||||||
export CPU_ARCH_JAVA="386"
|
export CPU_ARCH_JAVA="386"
|
||||||
export CPU_ARCH_DPKG="i386"
|
export CPU_ARCH_DPKG="i386"
|
||||||
export CPU_ARCH_CMAKE="i386"
|
export CPU_ARCH_CMAKE="i386"
|
||||||
export CLANG_TRIPLE="i386-linux-gnu"
|
export CLANG_TRIPLE="i386-linux-gnu"
|
||||||
|
export CPU_COMPILATION_TOOL="gnu"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$CPU_ARCHITECTURE_NAME" == "amd64" ]]; then
|
elif [[ "$CPU_ARCHITECTURE_NAME" == "amd64" ]]; then
|
||||||
export CPU_ARCH_JAVA="amd64"
|
export CPU_ARCH_JAVA="amd64"
|
||||||
export CPU_ARCH_DPKG="amd64"
|
export CPU_ARCH_DPKG="amd64"
|
||||||
export CPU_ARCH_CMAKE="x86_64"
|
export CPU_ARCH_CMAKE="x86_64"
|
||||||
export CLANG_TRIPLE="x86_64-linux-gnu"
|
export CLANG_TRIPLE="x86_64-linux-gnu"
|
||||||
|
export CPU_COMPILATION_TOOL="gnu"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
elif [[ "$CPU_ARCHITECTURE_NAME" == "ppc64le" ]]; then
|
elif [[ "$CPU_ARCHITECTURE_NAME" == "ppc64le" ]]; then
|
||||||
export CPU_ARCH_JAVA="ppc64le"
|
export CPU_ARCH_JAVA="ppc64le"
|
||||||
export CPU_ARCH_DPKG="ppc64el"
|
export CPU_ARCH_DPKG="ppc64el"
|
||||||
export CPU_ARCH_CMAKE="ppc64el"
|
export CPU_ARCH_CMAKE="ppc64el"
|
||||||
export CLANG_TRIPLE="powerpc64-linux-gnu"
|
export CLANG_TRIPLE="powerpc64-linux-gnu"
|
||||||
|
export CPU_COMPILATION_TOOL="gnu"
|
||||||
export CPU_CORES_NUM="2"
|
export CPU_CORES_NUM="2"
|
||||||
else
|
else
|
||||||
echo "Unrecognized cpu arch: $CPU_ARCHITECTURE_NAME"
|
echo "Unrecognized cpu arch: $CPU_ARCHITECTURE_NAME"
|
||||||
@ -57,7 +67,7 @@ if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
|||||||
export CMAKE_EXTRA_ARGUMENTS="$CMAKE_EXTRA_ARGUMENTS -DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\""
|
export CMAKE_EXTRA_ARGUMENTS="$CMAKE_EXTRA_ARGUMENTS -DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CPU_ARCHITECTURE_NAME" == "386" ]] || [[ "$CPU_ARCHITECTURE_NAME" == "armv6" ]] || [[ "$CPU_ARCHITECTURE_NAME" == "armv7" ]]; then
|
if [[ "$CPU_ARCHITECTURE_NAME" == "386" ]] || [[ "$CPU_ARCHITECTURE_NAME" == "armhf" ]]; then
|
||||||
export CMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS -latomic"
|
export CMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS -latomic"
|
||||||
export LDFLAGS="$LDFLAGS -latomic"
|
export LDFLAGS="$LDFLAGS -latomic"
|
||||||
export CXXFLAGS="$CXXFLAGS -latomic"
|
export CXXFLAGS="$CXXFLAGS -latomic"
|
||||||
@ -68,8 +78,8 @@ if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
|||||||
export CXX="g++"
|
export CXX="g++"
|
||||||
|
|
||||||
export CROSS_CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++"
|
export CROSS_CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++"
|
||||||
export CROSS_CC="${CPU_ARCH_CMAKE}-linux-gnu-gcc"
|
export CROSS_CC="${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-gcc"
|
||||||
export CROSS_CXX="${CPU_ARCH_CMAKE}-linux-gnu-g++"
|
export CROSS_CXX="${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-g++"
|
||||||
|
|
||||||
CROSS_BUILD_DEPS_DIR="$(realpath "../../")/.cache/tdlib-build-cross-${CPU_ARCH_DPKG}/"
|
CROSS_BUILD_DEPS_DIR="$(realpath "../../")/.cache/tdlib-build-cross-${CPU_ARCH_DPKG}/"
|
||||||
export CROSS_BUILD_DEPS_DIR
|
export CROSS_BUILD_DEPS_DIR
|
||||||
@ -89,3 +99,5 @@ echo "CMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}"
|
|||||||
echo "CMAKE_EXTRA_ARGUMENTS=${CMAKE_EXTRA_ARGUMENTS}"
|
echo "CMAKE_EXTRA_ARGUMENTS=${CMAKE_EXTRA_ARGUMENTS}"
|
||||||
echo "CROSS_BUILD_DEPS_DIR=${CROSS_BUILD_DEPS_DIR}"
|
echo "CROSS_BUILD_DEPS_DIR=${CROSS_BUILD_DEPS_DIR}"
|
||||||
echo "============================="
|
echo "============================="
|
||||||
|
|
||||||
|
export CORE_VARIABLES_SET="YES"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armhf | ppc64le>
|
||||||
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armhf | ppc64le>
|
||||||
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
# OPERATING_SYSTEM_NAME_SHORT = <win | linux | osx>
|
||||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||||
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
||||||
s/${CPU_ARCHITECTURE_NAME}/armv6/
|
s/${CPU_ARCHITECTURE_NAME}/armhf/
|
||||||
s/${IMPLEMENTATION_NAME}/tdlib/
|
s/${IMPLEMENTATION_NAME}/tdlib/
|
@ -1,4 +1,4 @@
|
|||||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||||
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
||||||
s/${CPU_ARCHITECTURE_NAME}/armv6/
|
s/${CPU_ARCHITECTURE_NAME}/armhf/
|
||||||
s/${IMPLEMENTATION_NAME}/tdlight/
|
s/${IMPLEMENTATION_NAME}/tdlight/
|
@ -1,4 +1,4 @@
|
|||||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||||
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
||||||
s/${CPU_ARCHITECTURE_NAME}/armv7/
|
s/${CPU_ARCHITECTURE_NAME}/s390x/
|
||||||
s/${IMPLEMENTATION_NAME}/tdlib/
|
s/${IMPLEMENTATION_NAME}/tdlib/
|
@ -1,4 +1,4 @@
|
|||||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||||
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
s/${OPERATING_SYSTEM_NAME_SHORT}/linux/
|
||||||
s/${CPU_ARCHITECTURE_NAME}/armv7/
|
s/${CPU_ARCHITECTURE_NAME}/s390x/
|
||||||
s/${IMPLEMENTATION_NAME}/tdlight/
|
s/${IMPLEMENTATION_NAME}/tdlight/
|
Loading…
Reference in New Issue
Block a user